diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2025-05-26 13:14:58 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska@appnovation.com> | 2025-05-26 13:14:58 +0000 |
| commit | 44c66eb2bab365b20327a5e71a858ff6602546c5 (patch) | |
| tree | 8d5fef844a53891f31e8e779c3313b0782cf9e56 /tools | |
| parent | 4baac19463dd2920b28c102c0690b7b87cb45006 (diff) | |
| download | utmps-44c66eb2bab365b20327a5e71a858ff6602546c5.tar.gz | |
Tentative dylib support
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/configure.template | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/configure.template b/tools/configure.template index c0e2945..20c8516 100755 --- a/tools/configure.template +++ b/tools/configure.template @@ -147,6 +147,7 @@ pkgconfdir='$prefix/lib/pkgconfig' shebangdir='$bindir' sysdeps='$prefix/lib/skalibs/sysdeps' manualsysdeps=false +shlibext=so shared=false static=true allpic=true @@ -373,11 +374,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 @@ -467,16 +475,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 |
