apr-config is giving me -lapr instead of -lapr-0. The attached patch seems to fix this problem.

--
Scott Lamb
Index: apr-config.in
===================================================================
RCS file: /home/cvspublic/apr/apr-config.in,v
retrieving revision 1.22
diff -u -r1.22 apr-config.in
--- apr-config.in       19 Aug 2002 06:33:09 -0000      1.22
+++ apr-config.in       26 Aug 2002 07:11:27 -0000
@@ -139,6 +139,8 @@
     LA_FILE="$thisdir/${APR_LIBNAME}.la"
 fi
 
+APR_LIBNAME_NOPREFIX="`echo "${APR_LIBNAME}" | sed -e s/^lib//`"
+
 flags=""
 
 while test $# -gt 0; do
@@ -189,9 +191,9 @@
     --link-ld)
     if test "$location" = "installed"; then
         ### avoid using -L if libdir is a "standard" location like /usr/lib
-        flags="$flags -L$libdir -lapr"
+        flags="$flags -L$libdir -l${APR_LIBNAME_NOPREFIX}"
     else
-        flags="$flags -L$thisdir -lapr"
+        flags="$flags -L$thisdir -l${APR_LIBNAME_NOPREFIX}"
     fi
     ;;
     --link-libtool)
@@ -203,7 +205,7 @@
         flags="$flags $LA_FILE"
     elif test "$location" = "installed"; then
         ### avoid using -L if libdir is a "standard" location like /usr/lib
-        flags="$flags -L$libdir -lapr"
+        flags="$flags -L$libdir -l${APR_LIBNAME_NOPREFIX}"
     else
         flags="$flags $LA_FILE"
     fi

Reply via email to