From e8d804938284cccea23c1b15c9d82e935c46f427 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 10 Feb 2025 08:58:39 +1100 Subject: [PATCH] Added --installnamedir --- configure | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6491d93a..51762932 100755 --- a/configure +++ b/configure @@ -83,6 +83,7 @@ bindir=${bindir-'${exec_prefix}/bin'} libdir=${libdir-'${exec_prefix}/lib'} sharedlibdir=${sharedlibdir-'${libdir}'} includedir=${includedir-'${prefix}/include'} +installnamedir=${installnamedir-'@rpath'} mandir=${mandir-'${prefix}/share/man'} shared_ext='.so' shared=1 @@ -158,7 +159,7 @@ case "$1" in echo 'usage:' | tee -a configure.log echo ' configure [--prefix=PREFIX] [--eprefix=EXPREFIX]' | tee -a configure.log echo ' [--static] [--32] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]' | tee -a configure.log - echo ' [--includedir=INCLUDEDIR] [--mandir=MANDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log + echo ' [--includedir=INCLUDEDIR] [--installnamedir="@rpath"] [--mandir=MANDIR] [--archs="-arch i386 -arch x86_64"]' | tee -a configure.log echo ' [--sprefix=SYMBOL_PREFIX] Adds a prefix to all exported symbols' | tee -a configure.log echo ' [--warn] Enables extra compiler warnings' | tee -a configure.log echo ' [--debug] Enables extra debug prints during operation' | tee -a configure.log @@ -183,6 +184,7 @@ case "$1" in -l*=* | --libdir=*) libdir=$(echo $1 | sed 's/.*=//'); shift ;; --sharedlibdir=*) sharedlibdir=$(echo $1 | sed 's/.*=//'); shift ;; -i*=* | --includedir=*) includedir=$(echo $1 | sed 's/.*=//');shift ;; + --installnamedir=*) installnamedir=$(echo $1 | sed 's/.*=//'); shift ;; --mandir=*) mandir=$(echo $1 | sed 's/.*=//');shift ;; -u*=* | --uname=*) uname=$(echo $1 | sed 's/.*=//');shift ;; -p* | --prefix) prefix="$2"; shift; shift ;; @@ -472,7 +474,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then SHAREDLIBM=${LIBNAME}.$VER1$shared_ext SHAREDTARGET=$SHAREDLIBV LDSHARED=${LDSHARED-"$cc"} - LDSHAREDFLAGS="-dynamiclib -install_name @rpath/${SHAREDLIBM} -compatibility_version ${VER1} -current_version ${VER3}" + LDSHAREDFLAGS="-dynamiclib -install_name ${installnamedir}/${SHAREDLIBM} -compatibility_version ${VER1} -current_version ${VER3}" if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then AR="${CROSS_PREFIX}libtool" elif libtool -V 2>&1 | grep Apple > /dev/null; then @@ -1982,6 +1984,7 @@ echo TEST = $TEST >> configure.log echo VER = $VER >> configure.log echo exec_prefix = $exec_prefix >> configure.log echo includedir = $includedir >> configure.log +echo installnamedir = $installnamedir >> configure.log echo bindir = $bindir >> configure.log echo libdir = $libdir >> configure.log echo mandir = $mandir >> configure.log @@ -2053,6 +2056,7 @@ sed < $SRCDIR/Makefile.in " /^libdir *=/s#=.*#= $libdir# /^sharedlibdir *=/s#=.*#= $sharedlibdir# /^includedir *=/s#=.*#= $includedir# +/^installnamedir *=/s#=.*#= $installnamedir# /^mandir *=/s#=.*#= $mandir# /^SRCDIR *=/s#=.*#=$SRCDIR# /^INCLUDES *=/s#=.*#=$INCLUDES# @@ -2252,6 +2256,7 @@ sed < $SRCDIR/zlib.pc.in " /^libdir *=/s#=.*#=$libdir# /^sharedlibdir *=/s#=.*#=$sharedlibdir# /^includedir *=/s#=.*#=$includedir# +/^installnamedir *=/s#=.*#=$installnamedir# /^mandir *=/s#=.*#=$mandir# /^LDFLAGS *=/s#=.*#=$LDFLAGS# " | sed -e "