]> andersk Git - openssh.git/commitdiff
- (djm) Use case statements in autoconf to clean up some tests
authordjm <djm>
Wed, 23 Jan 2002 00:20:59 +0000 (00:20 +0000)
committerdjm <djm>
Wed, 23 Jan 2002 00:20:59 +0000 (00:20 +0000)
ChangeLog
configure.ac

index 6ab471b0c118b0a05213fc87bba35f29667506c9..c80f6e03412d0f9455f7e33d014609bf980f78c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
  - (djm) Fix non-standard shell syntax in autoconf. Patch from 
    Dave Dykstra <dwd@bell-labs.com>
  - (stevesk) fix --with-zlib=
+ - (djm) Use case statements in autoconf to clean up some tests
 
 20020122
  - (djm) autoconf hacking:
index 14fd9af016a3c38bbbb7ae68d8561619efce5107..292a088d75e4d7987aee1571345c60a421cc3f04 100644 (file)
@@ -1,4 +1,4 @@
-i# $Id$
+# $Id$
 
 AC_INIT
 AC_CONFIG_SRCDIR([ssh.c])
@@ -897,7 +897,17 @@ AC_SUBST(INSTALL_SSH_RAND_HELPER)
 AC_ARG_WITH(prngd-port,
        [  --with-prngd-port=PORT  read entropy from PRNGD/EGD TCP localhost:PORT],
        [
-               if test ! -z "$withval" -a "x$withval" != "xno" ; then
+               case "$withval" in
+               no)
+                       withval=""
+                       ;;
+               [[0-9]]*)
+                       ;;
+               *)
+                       AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port)
+                       ;;
+               esac
+               if test ! -z "$withval" ; then
                        PRNGD_PORT="$withval"
                        AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT)
                fi
@@ -908,18 +918,24 @@ AC_ARG_WITH(prngd-port,
 AC_ARG_WITH(prngd-socket,
        [  --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
        [
-               if test -z "$withval" ; then
+               case "$withval" in
+               yes)
                        withval="/var/run/egd-pool"
-               fi
-               if test "x$withval" != "xno" ; then
+                       ;;
+               no)
+                       withval=""
+                       ;;
+               /*)
+                       ;;
+               *)
+                       AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
+                       ;;
+               esac
+
+               if test ! -z "$withval" ; then
                        if test ! -z "$PRNGD_PORT" ; then
                                AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket)
                        fi
-                       if echo "$withval" | grep '^/' >/dev/null 2>&1 ; then 
-                               # Good
-                       else
-                               AC_MSG_ERROR(You must specify an absolute path to the entropy socket)
-                       fi                      
                        if test ! -r "$withval" ; then
                                AC_MSG_WARN(Entropy socket is not readable)
                        fi
This page took 0.261021 seconds and 5 git commands to generate.