aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-05-26 13:03:20 +0000
committerLaurent Bercot <ska@appnovation.com>2025-05-26 13:03:20 +0000
commit3edfa29f00461135bafd0cc5304a20c5f2755845 (patch)
treea4dd6d51f86800f0487532909604ca9486b98420 /configure
parentd97175d8ba3783c492ddbd1c03bb9a6222358a81 (diff)
downloadnsss-3edfa29f00461135bafd0cc5304a20c5f2755845.tar.gz
Tentative dylib support
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure15
1 files changed, 12 insertions, 3 deletions
diff --git a/configure b/configure
index e8e62b7..61d2e58 100755
--- a/configure
+++ b/configure
@@ -149,6 +149,7 @@ pkgconfdir='$prefix/lib/pkgconfig'
shebangdir='$bindir'
sysdeps='$prefix/lib/skalibs/sysdeps'
manualsysdeps=false
+shlibext=so
shared=false
static=true
allpic=true
@@ -378,11 +379,18 @@ if test ! -d $sysdeps || test ! -f $sysdeps/target ; then
echo "$0: error: $sysdeps is not a valid sysdeps directory"
exit 1
fi
-if [ "x$target" != "x$(cat $sysdeps/target)" ] ; then
+if test "$target" != "$(cat $sysdeps/target)" ; then
echo "$0: error: target $target does not match the contents of $sysdeps/target"
exit 1
fi
+echo "Shared libraries will be named ..."
+libc="${target##*-}"
+if test "${libc##darwin}" != "$libc" ; then
+ shlibext=dylib
+fi
+echo " ... *.$shlibext"
+
if $allpic ; then
tryflag CPPFLAGS_AUTO -fPIC
fi
@@ -472,16 +480,17 @@ LDFLAGS := ${LDFLAGS}${LDFLAGS_POST:+ }$LDFLAGS_POST
LDFLAGS_SHARED := $LDFLAGS_SHARED
LDFLAGS_NOSHARED :=$LDFLAGS_NOSHARED
CROSS_COMPILE := $cross
+SHLIB_EXT := ${shlibext}
vpath lib%.a$vpaths
-vpath lib%.so$vpathd
+vpath lib%.${shlibext}$vpathd
EOF
if $allstatic ; then
echo ".LIBPATTERNS := lib%.a"
echo "DO_ALLSTATIC := 1"
else
- echo ".LIBPATTERNS := lib%.so"
+ echo ".LIBPATTERNS := lib%.${shlibext}"
echo "DO_ALLSTATIC :="
fi
if $static ; then