Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > 19ddbbfa67a5242039268f52e0fff994 > files > 4

apr-1.7.0-3.mga8.src.rpm

--- apr-1.4.6/apr-config.in.config	2008-06-20 17:46:02.000000000 +0200
+++ apr-1.4.6/apr-config.in	2012-02-14 21:27:09.831792264 +0100
@@ -39,7 +39,6 @@ LDFLAGS="@EXTRA_LDFLAGS@"
 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@"
@@ -67,7 +66,7 @@ Known values for OPTION are:
   --srcdir          print APR source directory
   --installbuilddir print APR build helper directory
   --link-ld         print link switch(es) for linking to APR
-  --link-libtool    print the libtool inputs for linking to APR
+  --link-libtool    alias for --link-ld
   --shlib-path-var  print the name of the shared library path env var
   --apr-la-file     print the path to the .la file, if available
   --apr-so-ext      print the extensions of shared objects on this platform
@@ -91,11 +90,7 @@ if test $# -eq 0; then
     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 @@ while test $# -gt 0; do
     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,67 +138,31 @@ while test $# -gt 0; do
     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)
     echo $APR_DOTTED_VERSION
     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
-    ;;
-    --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
+    --link-ld|--link-libtool)
+    flags="$flags -l${APR_LIBNAME}"
     ;;
     --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"
+    echo "ERROR: Mandriva does not provide the $LA_FILE file." >&2
+    exit 1
     ;;
     --apr-so-ext)
     echo "$APR_SO_EXT"
@@ -223,11 +173,7 @@ while test $# -gt 0; do
     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)