Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > b943d0ca49c44a6952978c3d40f2250a > files > 3

apr-1.4.2-1mdv2010.1.src.rpm

--- apr-config.in	2008-06-20 17:46:25.000000000 +0200
+++ apr-config.in.oden	2009-07-04 18:32:42.000000000 +0200
@@ -39,7 +39,6 @@
 LIBS="@EXTRA_LIBS@"
 EXTRA_INCLUDES="@EXTRA_INCLUDES@"
 SHLIBPATH_VAR="@shlibpath_var@"
-APR_SOURCE_DIR="@apr_srcdir@"
 APR_BUILD_DIR="@apr_builddir@"
 APR_SO_EXT="@so_ext@"
 APR_LIB_TARGET="@export_lib_target@"
@@ -91,11 +90,7 @@
     exit 1
 fi
 
-if test "$location" = "installed"; then
-    LA_FILE="$libdir/lib${APR_LIBNAME}.la"
-else
-    LA_FILE="$APR_BUILD_DIR/lib${APR_LIBNAME}.la"
-fi
+LA_FILE="${libdir}/lib${APR_LIBNAME}.la"
 
 flags=""
 
@@ -120,16 +115,7 @@
     exit 0
     ;;
     --includedir)
-    if test "$location" = "installed"; then
-        flags="$includedir"
-    elif test "$location" = "source"; then
-        flags="$APR_SOURCE_DIR/include"
-    else
-        # this is for VPATH builds
-        flags="$APR_BUILD_DIR/include $APR_SOURCE_DIR/include"
-    fi
-    echo $flags
-    exit 0
+    echo $includedir
     ;;
     --cc)
     echo $CC
@@ -152,28 +138,14 @@
     flags="$flags $LDFLAGS"
     ;;
     --includes)
-    if test "$location" = "installed"; then
-        flags="$flags -I$includedir $EXTRA_INCLUDES"
-    elif test "$location" = "source"; then
-        flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
-    else
-        # this is for VPATH builds
-        flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
-    fi
+    flags="$flags -I$includedir $EXTRA_INCLUDES"
     ;;
     --srcdir)
-    echo $APR_SOURCE_DIR
+    echo ${libdir}/apr-$APR_MAJOR_VERSION
     exit 0
     ;;
     --installbuilddir)
-    if test "$location" = "installed"; then
-        echo "${installbuilddir}"
-    elif test "$location" = "source"; then
-        echo "$APR_SOURCE_DIR/build"
-    else
-        # this is for VPATH builds
-        echo "$APR_BUILD_DIR/build"
-    fi
+    echo "${installbuilddir}"
     exit 0
     ;;
     --version)
@@ -181,38 +153,17 @@
     exit 0
     ;;
     --link-ld)
-    if test "$location" = "installed"; then
-        ### avoid using -L if libdir is a "standard" location like /usr/lib
-        flags="$flags -L$libdir -l${APR_LIBNAME}"
-    else
-        ### this surely can't work since the library is in .libs?
-        flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
-    fi
+    flags="$flags -l${APR_LIBNAME}"
     ;;
     --link-libtool)
-    # If the LA_FILE exists where we think it should be, use it.  If we're
-    # installed and the LA_FILE does not exist, assume to use -L/-l
-    # (the LA_FILE may not have been installed).  If we're building ourselves,
-    # we'll assume that at some point the .la file be created.
-    if test -f "$LA_FILE"; then
-        flags="$flags $LA_FILE"
-    elif test "$location" = "installed"; then
-        ### avoid using -L if libdir is a "standard" location like /usr/lib
-        # Since the user is specifying they are linking with libtool, we
-        # *know* that -R will be recognized by libtool.
-        flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
-    else
-        flags="$flags $LA_FILE"
-    fi
+    flags="$flags $LA_FILE"
     ;;
     --shlib-path-var)
     echo "$SHLIBPATH_VAR"
     exit 0
     ;;
     --apr-la-file)
-    if test -f "$LA_FILE"; then
-        flags="$flags $LA_FILE"
-    fi
+    flags="$flags $LA_FILE"
     ;;
     --apr-so-ext)
     echo "$APR_SO_EXT"
@@ -223,11 +174,7 @@
     exit 0
     ;;
     --apr-libtool)
-    if test "$location" = "installed"; then
-        echo "${installbuilddir}/libtool"
-    else
-        echo "$APR_BUILD_DIR/libtool"
-    fi
+    echo "${SHELL} ${installbuilddir}/libtool"
     exit 0
     ;;
     --help)