freebsd-ports/devel/libslang/files/patch-aa
Steve Price 09ba9d8694 Remove '-lc' from LDLIBS so threaded apps can link against libslang
as well.

PR:		24853
Submitted by:	Jeremy Norris <ishmael27@home.com>
Approved by:	maintainer
2001-02-26 17:55:20 +00:00

70 lines
2.2 KiB
Text

--- configure.orig Tue Feb 20 20:17:29 2001
+++ configure Mon Feb 26 11:28:55 2001
@@ -1833,8 +1833,8 @@
#define HAVE_DLFCN_H 1
EOF
- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:1838: checking for dlopen in -ldl" >&5
+ echo $ac_n "checking for dlopenl""... $ac_c" 1>&6
+echo "configure:1838: checking for dlopen" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1869,7 +1869,7 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- DYNAMIC_LINK_LIB="-ldl"
+ DYNAMIC_LINK_LIB=""
cat >> confdefs.h <<\EOF
#define HAVE_DLOPEN 1
EOF
@@ -2023,7 +2023,7 @@
ELF_CFLAGS="$CFLAGS -fPIC"
ELF_LINK="$CC -shared"
ELF_LINK_CMD="\$(ELF_LINK)"
- ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
+ ELF_DEP_LIBS="\$(DL_LIB) -lm"
CC_SHARED="$CC $CFLAGS -shared -fPIC"
esac
@@ -2046,6 +2046,19 @@
IEEE_CFLAGS="-ieee_with_no_inexact"
fi
;;
+ *freebsd* )
+ if [ $PORTOBJFORMAT = elf ]; then
+ ELF_CC="\$(CC)"
+ ELF_CFLAGS="\$(CFLAGS) -fPIC"
+ ELF_LINK="\$(CC) -shared -Wl,-soname,\$(ELFLIB_MAJOR)"
+ ELF_LINK_CMD="\$(ELF_LINK)"
+ else
+ ELF_CC="\$(CC)"
+ ELF_CFLAGS="\$(CFLAGS) -fPIC"
+ ELF_LINK="ld -Bshareable -x"
+ ELF_LINK_CMD="\$(ELF_LINK)"
+ fi
+ ;;
* )
IEEE_CFLAGS=""
esac
@@ -2408,16 +2421,8 @@
echo $ac_n "checking SLANG_VERSION""... $ac_c" 1>&6
echo "configure:2411: checking SLANG_VERSION" >&5
-slang_version=`grep "^#define *SLANG_VERSION " $srcdir/src/slang.h |
- awk '{ print $3 }'`
-slang_major_version=`echo $slang_version |
- awk '{ print int($1/10000) }'`
-slang_minor_version=`echo $slang_version $slang_major_version |
- awk '{ print int(($1 - $2*10000)/100) }'`
-slang_mminor_version=`echo $slang_version $slang_major_version $slang_minor_version |
- awk '{ print ($1 - $2*10000 - $3*100) }'`
-
-slang_minor_version="$slang_minor_version.$slang_mminor_version"
+slang_major_version=1
+slang_miner_version=4
slang_version="$slang_major_version.$slang_minor_version"
echo "$ac_t""$slang_version" 1>&6