Fix configure in solaris
authorNelson Ferreira <nelson.ferreira@ieee.org>
Tue, 6 Dec 2011 20:58:09 +0000 (15:58 -0500)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Tue, 6 Dec 2011 20:58:09 +0000 (15:58 -0500)
* m4/sxe-aux.m4 (SXE_CONSECUTIVE_UNDUP): Try use detected awk which will allow for better results. On solaris this should be either the xpg4 one, or gawk.

* m4/sxe-aux.m4 (SXE_UNDUP): Ditto

* m4/sxe-summary.m4 (SXE_SUMMARY): Ditto

* m4/sxe-crypto.m4 (SXE_OPENSSL_VERSION): Try to use detected grep which will allow for -q. On solaris this should be either gnu grep or the xpg4 one.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
m4/sxe-aux.m4
m4/sxe-crypto.m4
m4/sxe-summary.m4

index 3e21c12..4331e9c 100644 (file)
@@ -342,12 +342,12 @@ $1="$T"
 
 dnl SXE_CONSECUTIVE_UNDUP(var, words)
 AC_DEFUN([SXE_CONSECUTIVE_UNDUP],[
-$1=`echo "$2" | awk -v RS=" " '{if([$]1[] != SXEL) {printf "%s ", [$]1[]} SXEL=[$]1[]}' `
+$1=`echo "$2" | ${AWK-awk} 'BEGIN {RS=" "} {if([$]1[] != SXEL) {printf "%s ", [$]1[]} SXEL=[$]1[]}' `
 ])dnl SXE_CONSECUTIVE_UNDUP
 
 dnl SXE_UNDUP(var, words)
 AC_DEFUN([SXE_UNDUP],[
-$1=`echo "$2" | awk -v RS=" " '{VAL=[$]1[]; if(VAL in SXEL){}else{printf "%s ", VAL} SXEL[[VAL]]=1}' `
+$1=`echo "$2" | ${AWK-awk} 'BEGIN {RS=" "} {VAL=[$]1[]; if(VAL in SXEL){}else{printf "%s ", VAL} SXEL[[VAL]]=1}' `
 ])dnl SXE_UNDUP
 
 \f
index 61f2cdd..4ae9d7d 100644 (file)
@@ -23,7 +23,7 @@ AC_DEFUN([SXE_OPENSSL_VERSION], [dnl
        allowed_versions="0.9.7[e-z] 0.9.8* 0.9.9* 1.0.0*"
        OPENSSL_SANE_P=no
        for ver in $allowed_versions; do
-               if echo "$OPENSSL_VERSION" | grep -q "$ver"; then
+               if echo "$OPENSSL_VERSION" | ${GREP-grep} -q "$ver"; then
                        OPENSSL_SANE_P="yes"
                        break;
                fi
index dd82537..5c25982 100644 (file)
@@ -86,11 +86,11 @@ fi
 if test "$with_modules" != "no"; then
   echo "
     - Module search path:"
-  echo ${MODULE_PATH} | awk -v RS=":" '{ print "       ",[$]1[] }'
+  echo ${MODULE_PATH} | ${AWK-awk} 'BEGIN {RS=":"} { print "       ",[$]1[] }'
 fi
 echo "
     - Package search path:"
-  echo ${PACKAGE_PATH} | awk -v RS=":" '{ print "       ",[$]1[] }'
+  echo ${PACKAGE_PATH} | ${AWK-awk} 'BEGIN {RS=":"} { print "       ",[$]1[] }'
 
 echo "
 Debugging options:"