Bug 558 - configure broken_dirname checks not run on Solaris 2.5.1
Summary: configure broken_dirname checks not run on Solaris 2.5.1
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: -current
Hardware: All Solaris
: P2 major
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks: 627
  Show dependency treegraph
 
Reported: 2003-05-09 12:47 AEST by Alex Kiernan
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments
Move other libgen tests after dirname test, remove first libgen.h test. (1.39 KB, patch)
2003-09-09 15:10 AEST, Darren Tucker
djm: ok+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kiernan 2003-05-09 12:47:54 AEST
In 3.6.1p2 the broken_dirname checks for Solaris 2.5.1 aren't getting run out 
of configure because -lgen has already been detected.

This fixes the problem (moves all checks against -lgen after the dirname 
checks):

RCS file: /cvsroot/upstream/openssh/configure.ac,v
retrieving revision 1.1.1.10
diff -u -r1.1.1.10 configure.ac
--- configure.ac	2003/04/29 09:12:08	1.1.1.10
+++ configure.ac	2003/05/09 03:00:53
@@ -410,9 +410,6 @@
     fi
 fi
 
-AC_CHECK_FUNC(getspnam, ,
-	AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
-
 AC_ARG_WITH(rpath,
 	[  --without-rpath         Disable auto-added -R linker paths],
 	[
@@ -622,7 +619,6 @@
 )
 
 AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP))
-AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
 
 dnl Make sure strsep prototype is defined before defining HAVE_STRSEP
 AC_CHECK_DECL(strsep, [AC_CHECK_FUNCS(strsep)])
@@ -663,6 +659,10 @@
 		fi
 	])
 ])
+
+AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
+AC_CHECK_FUNC(getspnam, ,
+	AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen"))
 
 dnl    Checks for time functions
 AC_CHECK_FUNCS(gettimeofday time)
Comment 1 Alex Kiernan 2003-05-09 12:50:00 AEST
Ignore the fix - it fixes configure, but breaks at build time due to 
incompatible dirname prototypes (libgen.h)
Comment 2 Darren Tucker 2003-09-06 12:58:48 AEST
I'm pretty sure this has the same root cause as bug #615.  Please try the
proposed fix at comments 8 & 9:
http://bugzilla.mindrot.org/show_bug.cgi?id=615#c8
Comment 3 Darren Tucker 2003-09-09 15:10:33 AEST
Created attachment 391 [details]
Move other libgen tests after dirname test, remove first libgen.h test.

I think the attached patch will solve this: it removes the extra libgen.h test
and only defines HAVE_LIBGEN_H if HAVE_DIRNAME gets defined.  Hopefully this
won't break anything else...  if it does we'll probably need a
"DIRNAME_IS_CONST " test or something.

The ChangeLog entry for the previous libgen.h change is:
revision 1.107
date: 2003/02/24 01:47:16;  author: djm;  state: Exp;  lines: +3 -3
 - (djm) Most of Bug #499: Cygwin compile fixes for new progressmeter

I have confirmed that is fixes the problem on Solaris 2.5.1 and that Cygwin
still builds after this change.  OK?
Comment 4 Alex Kiernan 2003-09-09 15:43:25 AEST
The patch is (modulo exchanging the order of the final basename & getspnam 
checks), identical to what I've been using locally to get the build to work on 
Solaris 2.5.1. Seems extremely likely that this fixes the problem.
Comment 5 Darren Tucker 2003-09-09 16:17:22 AEST
Thanks, I'll put this in the queue to be fixed for 3.7.
Comment 6 Damien Miller 2003-09-11 13:18:45 AEST
Comment on attachment 391 [details]
Move other libgen tests after dirname test, remove first libgen.h test.

Looks fine to me
Comment 7 Darren Tucker 2003-09-11 14:45:07 AEST
Fixed, thanks.

20030911
 - (dtucker) [configure.ac] Bug #588, #615: Move other libgen tests to after
   the dirname test, to allow a broken dirname to be detected correctly.
   Based partially on patch supplied by alex.kiernan at thus.net.  ok djm@
Comment 8 Damien Miller 2004-04-14 12:24:19 AEST
Mass change of RESOLVED bugs to CLOSED