]> andersk Git - openssh.git/commitdiff
Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
authortim <tim>
Tue, 26 Feb 2002 16:40:48 +0000 (16:40 +0000)
committertim <tim>
Tue, 26 Feb 2002 16:40:48 +0000 (16:40 +0000)
based on patch by mooney@dogbert.cc.ndsu.nodak.edu (Tim Mooney)
Bug 45 [configure.ac] modify skey test to work around conflict with autoconf
reported by nolan@naic.edu (Michael Nolan)
patch by  Pekka Savola <pekkas@netcore.fi>
Bug 74 [configure.ac defines.h] add sig_atomic_t test
reported by dwd@bell-labs.com (Dave Dykstra)
Bug 102 [defines.h] UNICOS fixes. patch by wendyp@cray.com
[configure.ac Makefile.in] link libwrap only with sshd
based on patch by Maciej W. Rozycki <macro@ds2.pg.gda.pl>
Bug 123 link libpam only with sshd
reported by peak@argo.troja.mff.cuni.cz (Pavel Kankovsky)
[configure.ac defines.h] modify previous SCO3 fix to not break Solaris 7
[acconfig.h] remove unused HAVE_REGCOMP

ChangeLog
Makefile.in
acconfig.h
configure.ac
defines.h

index 32db9593e81883a15c41f7ffcfcf4778a155a377..8d8777f8c3fbdd4d94b56ccc673091b2a13a9f54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+20020226
+ - (tim) Bug 12 [configure.ac] add sys/bitypes.h to int64_t tests
+   based on patch by mooney@dogbert.cc.ndsu.nodak.edu (Tim Mooney)
+   Bug 45 [configure.ac] modify skey test to work around conflict with autoconf
+   reported by nolan@naic.edu (Michael Nolan)
+   patch by  Pekka Savola <pekkas@netcore.fi>
+   Bug 74 [configure.ac defines.h] add sig_atomic_t test
+   reported by dwd@bell-labs.com (Dave Dykstra)
+   Bug 102 [defines.h] UNICOS fixes. patch by wendyp@cray.com
+   [configure.ac Makefile.in] link libwrap only with sshd
+   based on patch by Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+   Bug 123 link libpam only with sshd
+   reported by peak@argo.troja.mff.cuni.cz (Pavel Kankovsky)
+   [configure.ac defines.h] modify previous SCO3 fix to not break Solaris 7
+   [acconfig.h] remove unused HAVE_REGCOMP
+
 20020225
  - (bal) Last AIX patch.  Moved aix_usrinfo() outside of do_setuserconext()
    since we need more session information than provided by that function.
index 8d2931bf43cfdf8eab140609c8091f9b319ad4e5..364b1a4d48a450df25b1e8338f773f0410261502 100644 (file)
@@ -31,6 +31,8 @@ LD=@LD@
 CFLAGS=@CFLAGS@
 CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
 LIBS=@LIBS@
+LIBPAM=@LIBPAM@
+LIBWRAP=@LIBWRAP@
 AR=@AR@
 RANLIB=@RANLIB@
 INSTALL=@INSTALL@
@@ -100,7 +102,7 @@ ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
        $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
 
 sshd$(EXEEXT): libssh.a        $(LIBCOMPAT) $(SSHDOBJS)
-       $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
+       $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBS)
 
 scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o
        $(LD) -o $@ scp.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
index a1e57acc4d6f6740e90cea731871914a650a75eb..8382c85489ad7a0b4861285dd652d91c461a2b1d 100644 (file)
 #undef HAVE_SS_FAMILY_IN_SS
 #undef HAVE___SS_FAMILY_IN_SS
 
-/* Define if you have a regcomp() function */
-#undef HAVE_REGCOMP
-
 /* Define if you have /dev/ptmx */
 #undef HAVE_DEV_PTMX
 
index c29d41b699b8ac8e4c2f4d4b09ef6854da36d6e4..151dc33707fcc21afae16da707e3e1dc0af4c1a6 100644 (file)
@@ -320,6 +320,18 @@ AC_ARG_WITH(libs,
        ]       
 )
 
+# Checks for header files.
+AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
+       getopt.h glob.h lastlog.h limits.h login.h \
+       login_cap.h maillock.h netdb.h netgroup.h \
+       netinet/in_systm.h paths.h poll.h pty.h \
+       security/pam_appl.h shadow.h stddef.h stdint.h \
+       strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
+       sys/poll.h sys/queue.h sys/select.h sys/stat.h \
+       sys/stropts.h sys/sysmacros.h sys/time.h \
+       sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \
+       util.h utime.h utmp.h utmpx.h)
+
 # Checks for libraries.
 AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match))
 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
@@ -391,19 +403,6 @@ AC_CHECK_FUNCS(logout updwtmp logwtmp)
 
 AC_FUNC_STRFTIME
 
-# Checks for header files.
-AC_CHECK_HEADERS(bstring.h crypt.h endian.h floatingpoint.h \
-       getopt.h glob.h lastlog.h limits.h login.h \
-       login_cap.h maillock.h netdb.h netgroup.h \
-       netinet/in_systm.h paths.h poll.h pty.h \
-       rpc/rpc.h \
-       security/pam_appl.h shadow.h stddef.h stdint.h \
-       strings.h sys/bitypes.h sys/bsdtty.h sys/cdefs.h \
-       sys/poll.h sys/queue.h sys/select.h sys/stat.h \
-       sys/stropts.h sys/sysmacros.h sys/time.h \
-       sys/ttcompat.h sys/un.h time.h ttyent.h usersec.h \
-       util.h utime.h utmp.h utmpx.h)
-
 # Check for ALTDIRFUNC glob() extension
 AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support)
 AC_EGREP_CPP(FOUNDIT,
@@ -469,9 +468,16 @@ AC_ARG_WITH(skey,
                        LIBS="-lskey $LIBS"
                        SKEY_MSG="yes" 
        
-                       AC_CHECK_FUNC(skey_keyinfo,
-                               [],
+                       AC_MSG_CHECKING([for s/key support])
+                       AC_TRY_RUN(
+                               [
+#include <stdio.h>
+#include <skey.h>
+int main() { char *ff = skey_keyinfo(""); ff=""; return 0; }
+                               ],
+                               [AC_MSG_RESULT(yes)],
                                [
+                                       AC_MSG_RESULT(no)
                                        AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
                                ])
                fi
@@ -508,7 +514,8 @@ AC_ARG_WITH(tcp-wrappers,
                                        CPPFLAGS="-I${withval} ${CPPFLAGS}"
                                fi
                        fi
-                       LIBS="-lwrap $LIBS"
+                       LIBWRAP="-lwrap"
+                       LIBS="$LIBWRAP $LIBS"
                        AC_MSG_CHECKING(for libwrap)
                        AC_TRY_LINK(
                                [
@@ -519,12 +526,14 @@ AC_ARG_WITH(tcp-wrappers,
                                [
                                        AC_MSG_RESULT(yes)
                                        AC_DEFINE(LIBWRAP)
+                                       AC_SUBST(LIBWRAP)
                                        TCPW_MSG="yes"
                                ],
                                [
                                        AC_MSG_ERROR([*** libwrap missing])
                                ]
                        )
+                       LIBS="$saved_LIBS"
                fi
        ]
 )
@@ -640,6 +649,7 @@ AC_ARG_WITH(pam,
                        PAM_MSG="yes"
 
                        AC_DEFINE(USE_PAM)
+                       AC_SUBST(LIBPAM, ["-lpam -ldl"])
                fi
        ]
 )
@@ -956,6 +966,25 @@ AC_ARG_WITH(prngd-socket,
                        PRNGD_SOCKET="$withval"
                        AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
                fi
+       ],
+       [
+               # Check for existing socket only if we don't have a random device already
+               if test "$USE_RAND_HELPER" = yes ; then
+                       AC_MSG_CHECKING(for PRNGD/EGD socket)
+                       # Insert other locations here
+                       for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
+                               if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
+                                       PRNGD_SOCKET="$sock"
+                                       AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
+                                       break;
+                               fi
+                       done
+                       if test ! -z "$PRNGD_SOCKET" ; then
+                               AC_MSG_RESULT($PRNGD_SOCKET)
+                       else
+                               AC_MSG_RESULT(not found)
+                       fi
+               fi
        ]
 )
 
@@ -1086,6 +1115,19 @@ if test -z "$have_int64_t" ; then
        )
 fi
 
+if test -z "$have_int64_t" ; then
+    AC_MSG_CHECKING([for int64_t type in sys/bitypes.h])
+       AC_TRY_COMPILE(
+               [ #include <sys/bitypes.h> ], 
+               [ int64_t a; a = 1],
+               [
+                       AC_DEFINE(HAVE_INT64_T)
+                       AC_MSG_RESULT(yes)
+               ],
+               [ AC_MSG_RESULT(no) ]
+       )
+fi
+
 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
        AC_TRY_COMPILE(
                [ #include <sys/types.h> ], 
@@ -1125,6 +1167,19 @@ if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
        have_u_int64_t=1
 fi
 
+if test -z "$have_u_int64_t" ; then
+    AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
+       AC_TRY_COMPILE(
+               [ #include <sys/bitypes.h> ], 
+               [ u_int64_t a; a = 1],
+               [
+                       AC_DEFINE(HAVE_U_INT64_T)
+                       AC_MSG_RESULT(yes)
+               ],
+               [ AC_MSG_RESULT(no) ]
+       )
+fi
+
 if test -z "$have_u_intxx_t" ; then
        AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
                AC_TRY_COMPILE(
@@ -1193,6 +1248,8 @@ fi
 
 TYPE_SOCKLEN_T
 
+AC_CHECK_TYPES(sig_atomic_t)
+
 AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
        AC_TRY_COMPILE(
                [
@@ -2191,6 +2248,11 @@ if test ! -z "$blibpath" ; then
        AC_MSG_WARN([Please check and edit -blibpath in LDFLAGS in Makefile])
 fi
 
+dnl remove pam and dl because they are in $LIBPAM
+if test "$PAM_MSG" = yes ; then
+       LIBS=`echo $LIBS | sed 's/-lpam -ldl //'`
+fi
+
 AC_EXEEXT
 AC_CONFIG_FILES([Makefile openbsd-compat/Makefile scard/Makefile ssh_prng_cmds])
 AC_OUTPUT
@@ -2240,7 +2302,7 @@ echo "          Compiler: ${CC}"
 echo "    Compiler flags: ${CFLAGS}"
 echo "Preprocessor flags: ${CPPFLAGS}"
 echo "      Linker flags: ${LDFLAGS}"
-echo "         Libraries: ${LIBS}"
+echo "         Libraries: ${LIBWRAP} ${LIBPAM} ${LIBS}"
 
 echo ""
 
index c37cee5e105701433573cbec26f2a66411b4eea4..4caea9b2c77255aafbfd1c4568609cd1513b8b8b 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -11,9 +11,6 @@
 #include <netinet/in_systm.h> /* For typedefs */
 #include <netinet/in.h> /* For IPv6 macros */
 #include <netinet/ip.h> /* For IPTOS macros */
-#ifdef HAVE_RPC_RPC_H
-# include <rpc/rpc.h> /* For INADDR_LOOPBACK on SCO OSR3 */
-#endif
 #ifdef HAVE_SYS_UN_H
 # include <sys/un.h> /* For sockaddr_un */
 #endif
@@ -144,6 +141,14 @@ enum
 # define       NFDBITS (8 * sizeof(unsigned long))
 #endif
 
+/*
+SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but
+including rpc/rpc.h breaks Solaris 6
+*/
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK ((ulong)0x7f000001)
+#endif
+
 /* Types */
 
 /* If sys/types.h does not supply intXX_t, supply them ourselves */
@@ -164,7 +169,11 @@ typedef char int8_t;
 typedef short int int16_t;
 # else
 #  ifdef _CRAY
+#   if (SIZEOF_SHORT_INT == 4)
+typedef short int16_t;
+#   else
 typedef long  int16_t;
+#   endif
 #  else
 #   error "16 bit int type not found."
 #  endif /* _CRAY */
@@ -197,7 +206,11 @@ typedef unsigned char u_int8_t;
 typedef unsigned short int u_int16_t;
 #  else
 #   ifdef _CRAY
+#    if (SIZEOF_SHORT_INT == 4)
+typedef unsigned short u_int16_t;
+#    else
 typedef unsigned long  u_int16_t;
+#    endif
 #   else
 #    error "16 bit int type not found."
 #   endif
@@ -272,6 +285,11 @@ typedef int pid_t;
 # define HAVE_PID_T
 #endif /* HAVE_PID_T */
 
+#ifndef HAVE_SIG_ATOMIC_T
+typedef int sig_atomic_t;
+# define HAVE_SIG_ATOMIC_T
+#endif /* HAVE_SIG_ATOMIC_T */
+
 #ifndef HAVE_MODE_T
 typedef int mode_t;
 # define HAVE_MODE_T
This page took 0.075786 seconds and 5 git commands to generate.