]> andersk Git - openssh.git/blobdiff - configure.in
- djm@cvs.openbsd.org 2001/03/13 22:42:54
[openssh.git] / configure.in
index 0a1e41d284f4cba2c3d48bf1bdf309d481ffbf54..e84ae69f79a9d03e7df427e628635d1064a51a27 100644 (file)
@@ -5,6 +5,7 @@ AC_INIT(ssh.c)
 AC_CONFIG_HEADER(config.h)
 AC_PROG_CC
 AC_CANONICAL_HOST
+AC_C_BIGENDIAN
 
 # Checks for programs.
 AC_PROG_CPP
@@ -202,6 +203,7 @@ mips-sony-bsd|mips-sony-newsos4)
        IPADDR_IN_DISPLAY=yes
        AC_DEFINE(USE_PIPES)
        AC_DEFINE(IP_TOS_IS_BROKEN)
+       AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
        mansubdir=cat
        LIBS="$LIBS -lgen -lnsl -lucb"
        ;;
@@ -257,7 +259,6 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(HAVE_SCO_PROTECTED_PW)
        AC_DEFINE(DISABLE_SHADOW)
        AC_DEFINE(HAVE_BOGUS_SYS_QUEUE_H)
-       AC_DEFINE(BROKEN_SAVED_UIDS)
        AC_CHECK_FUNCS(getluid setluid)
        ;;
 *-dec-osf*)
@@ -749,7 +750,7 @@ fi
 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 
 # version in OpenSSL. Skip this for PAM
 if test "x$PAM_MSG" = "xno" -a "x$check_for_libcrypt_later" = "x1"; then
-       AC_CHECK_LIB(crypt, crypt, )
+       AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt")
 fi
 
 # Cheap hack to ensure NEWS-OS libraries are arranged right.
@@ -1059,6 +1060,34 @@ if test "x$ac_cv_have_int64_t" = "xno" -a \
        "x$ac_cv_sizeof_long_int" != "x8" -a \
        "x$ac_cv_sizeof_long_long_int" = "x0" ; then
        NO_SFTP='#'
+else
+dnl test snprintf (broken on SCO w/gcc)
+       AC_TRY_RUN(
+               [
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_SNPRINTF
+main()
+{
+       char buf[50];
+       char expected_out[50];
+       int mazsize = 50 ;
+#if (SIZEOF_LONG_INT == 8)
+       long int num = 0x7fffffffffffffff;
+#else
+       long long num = 0x7fffffffffffffff;
+#endif
+       strcpy(expected_out, "9223372036854775807");
+       snprintf(buf, mazsize, "%lld", num);
+       if(strcmp(buf, expected_out) != 0)
+               exit(1);
+       exit(0);
+}
+#else
+main() { exit(0); }
+#endif
+               ], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ]
+       )
 fi
 AC_SUBST(NO_SFTP)
 
@@ -1266,13 +1295,24 @@ AC_ARG_WITH(random,
        ]
 )
 
-# Check for EGD pool file
-AC_ARG_WITH(egd-pool,
-       [  --with-egd-pool=FILE    read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
+# Check for PRNGD/EGD pool file
+AC_ARG_WITH(prngd-port,
+       [  --with-prngd-port=PORT  read entropy from PRNGD/EGD localhost:PORT],
+       [
+               if test ! -z "$withval" -a "x$withval" != "xno" ; then
+                       PRNGD_PORT="$withval"
+                       AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
+               fi
+       ]
+)
+
+# Check for PRNGD/EGD pool file
+AC_ARG_WITH(prngd-socket,
+       [  --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
        [
                if test "x$withval" != "xno" ; then
-                       EGD_SOCKET="$withval";
-                       AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
+                       PRNGD_SOCKET="$withval"
+                       AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET")
                fi
        ],
        [
@@ -1280,15 +1320,15 @@ AC_ARG_WITH(egd-pool,
                if test -z "$RANDOM_POOL" ; then
                        AC_MSG_CHECKING(for PRNGD/EGD socket)
                        # Insert other locations here
-                       for egdsock in /var/run/egd-pool /etc/entropy /tmp/entropy ; do
-                               if test -r $egdsock && $TEST_MINUS_S_SH -c "test -S $egdsock -o -p $egdsock" ; then
-                                       EGD_SOCKET="$egdsock"
-                                       AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
+                       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 -x "$EGD_SOCKET" ; then
-                               AC_MSG_RESULT($EGD_SOCKET)
+                       if test ! -z "$PRNGD_SOCKET" ; then
+                               AC_MSG_RESULT($PRNGD_SOCKET)
                        else
                                AC_MSG_RESULT(not found)
                        fi
@@ -1300,7 +1340,7 @@ AC_ARG_WITH(egd-pool,
 # detect pathnames for entropy gathering commands, if we need them
 INSTALL_SSH_PRNG_CMDS=""
 rm -f prng_commands
-if (test -z "$RANDOM_POOL" && test -z "$EGD_SOCKET") ; then
+if (test -z "$RANDOM_POOL" && test -z "$PRNGD") ; then
        # Use these commands to collect entropy
        OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
        OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
@@ -1406,11 +1446,64 @@ AC_ARG_WITH(default-path,
        [  --with-default-path=PATH Specify default \$PATH environment for server],
        [
                if test "x$withval" != "xno" ; then     
-                       AC_DEFINE_UNQUOTED(USER_PATH, "$withval")
+                       user_path="$withval"
                        SERVER_PATH_MSG="$withval" 
                fi
+       ],
+       [
+       AC_TRY_RUN(
+               [
+/* find out what STDPATH is */
+#include <stdio.h>
+#ifdef HAVE_PATHS_H
+# include <paths.h>
+#endif
+#ifndef _PATH_STDPATH
+# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#define DATA "conftest.stdpath"
+
+main()
+{
+       FILE *fd;
+       int rc;
+       
+       fd = fopen(DATA,"w");
+       if(fd == NULL)
+               exit(1);
+       
+       if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
+               exit(1);
+
+       exit(0);
+}
+               ], [ user_path=`cat conftest.stdpath` ],
+               [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
+               [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ]
+       )
+# make sure $bindir is in USER_PATH so scp will work
+               t_bindir=`eval echo ${bindir}`
+               case $t_bindir in
+                       NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
+               esac
+               case $t_bindir in
+                       NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
+               esac
+               echo $user_path | grep ":$t_bindir"  > /dev/null 2>&1
+               if test $? -ne 0  ; then
+                       echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
+                       if test $? -ne 0  ; then
+                               user_path=$user_path:$t_bindir
+                               AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work)
+                       fi
+               fi
        ]
 )
+AC_DEFINE_UNQUOTED(USER_PATH, "$user_path")
+AC_SUBST(user_path)
 
 # Whether to force IPv4 by default (needed on broken glibc Linux)
 IPV4_HACK_MSG="no" 
@@ -1749,8 +1842,10 @@ fi
 if test ! -z "$RANDOM_POOL" ; then
        RAND_MSG="Device ($RANDOM_POOL)"
 else
-       if test ! -z "$EGD_SOCKET" ; then
-               RAND_MSG="EGD/PRNGD ($EGD_SOCKET)"
+       if test ! -z "$PRNGD_PORT" ; then
+               RAND_MSG="PRNGD/EGD (port localhost:$PRNGD_PORT)"
+       elif test ! -z "$PRNGD_SOCKET" ; then
+               RAND_MSG="PRNGD/EGD (socket $PRNGD_SOCKET)"
        else
                RAND_MSG="Builtin (timeout $entropy_timeout)"
                BUILTIN_RNG=1
@@ -1765,6 +1860,7 @@ D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
+H=`eval echo ${user_path}` ; H=`eval echo ${H}`
 
 echo ""
 echo "OpenSSH configured has been configured with the following options."
@@ -1774,6 +1870,7 @@ echo "           Configuration files: $D"
 echo "               Askpass program: $E"
 echo "                  Manual pages: $F"
 echo "                      PID file: $G"
+echo "        sshd default user PATH: $H"
 echo "      Random number collection: $RAND_MSG"
 echo "                Manpage format: $MAN_MSG"
 echo "                   PAM support: ${PAM_MSG}"
This page took 0.04029 seconds and 4 git commands to generate.