Updated use of $1 and $2 in AC_SMART_CHECK_LIB() to work properly
authoraland <aland>
Mon, 8 Apr 2002 16:28:05 +0000 (16:28 +0000)
committeraland <aland>
Mon, 8 Apr 2002 16:28:05 +0000 (16:28 +0000)
aclocal.m4

index 46de358..27fe12b 100644 (file)
@@ -916,11 +916,12 @@ dnl #  Look for a library in a number of places.
 dnl #
 AC_DEFUN(AC_SMART_CHECK_LIB, [
 
+sm_lib_safe=`echo "$1" | sed 'y%./+-%__p_%'`
+sm_func_safe=`echo "$2" | sed 'y%./+-%__p_%'`
 AC_MSG_CHECKING([for $2 in -l$1])
 
 smart_lib=
 smart_lib_dir=
-ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
 
 dnl #
 dnl #  Try to link it first, using the default libs && library paths
@@ -953,7 +954,7 @@ dnl #
   dnl #
   if test "x$smart_lib" != "x"; then
     AC_MSG_RESULT(yes)
-    eval "ac_cv_lib_$ac_safe_$2=yes"
+    eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
     LIBS="$old_LIBS $smart_lib"
     SMART_LIBS="$SMART_LIBS $smart_lib"
   else