openbsd-ports/devel/libslang/patches/patch-configure

195 lines
5.9 KiB
Plaintext

--- configure.orig Tue Feb 20 21:17:29 2001
+++ configure Sun Mar 4 00:51:51 2001
@@ -2017,6 +2017,18 @@
CC_SHARED="cc \$(CFLAGS) -shared -K pic"
fi
;;
+ *openbsd* )
+ DYNAMIC_LINK_FLAGS=""
+ ELF_CC="$CC"
+ ELF_CFLAGS="$CFLAGS -fpic"
+ ELF_LINK="$CC -shared $ELF_CFLAGS"
+ ELF_LINK_CMD="\$(ELF_LINK)"
+ ELF_DEP_LIBS="\$(DL_LIB) -lm"
+ CC_SHARED="$CC -shared $ELF_CFLAGS"
+ if test "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != ""; then
+ DYNAMIC_LINK_FLAGS="-Wl,-E"
+ fi
+ ;;
* )
echo "Note: ELF compiler for host_os=$host_os may be wrong"
ELF_CC="$CC"
@@ -2087,6 +2099,9 @@
RPATH="-rpath "
fi
;;
+ *openbsd*)
+ RPATH="-Wl,-rpath,"
+ ;;
esac
if test "X$RPATH" != "X"
@@ -2100,7 +2115,7 @@
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2104: checking size of short" >&5
+echo "configure:2119: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2108,7 +2123,7 @@
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 2112 "configure"
+#line 2127 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2119,7 +2134,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -2139,7 +2154,7 @@
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2143: checking size of int" >&5
+echo "configure:2158: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2147,7 +2162,7 @@
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 2151 "configure"
+#line 2166 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2158,7 +2173,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -2178,7 +2193,7 @@
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2182: checking size of long" >&5
+echo "configure:2197: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2186,7 +2201,7 @@
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 2190 "configure"
+#line 2205 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2197,7 +2212,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -2217,7 +2232,7 @@
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:2221: checking size of float" >&5
+echo "configure:2236: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2225,7 +2240,7 @@
ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <<EOF
-#line 2229 "configure"
+#line 2244 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2236,7 +2251,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_float=`cat conftestval`
else
@@ -2256,7 +2271,7 @@
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:2260: checking size of double" >&5
+echo "configure:2275: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2264,7 +2279,7 @@
ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <<EOF
-#line 2268 "configure"
+#line 2283 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2275,7 +2290,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_double=`cat conftestval`
else
@@ -2304,7 +2319,7 @@
TERMCAP=-ltermcap
echo $ac_n "checking for Terminfo""... $ac_c" 1>&6
-echo "configure:2308: checking for Terminfo" >&5
+echo "configure:2323: checking for Terminfo" >&5
for terminfo_dir in $JD_Terminfo_Dirs
do
if test -d $terminfo_dir
@@ -2407,7 +2422,7 @@
echo $ac_n "checking SLANG_VERSION""... $ac_c" 1>&6
-echo "configure:2411: checking SLANG_VERSION" >&5
+echo "configure:2426: checking SLANG_VERSION" >&5
slang_version=`grep "^#define *SLANG_VERSION " $srcdir/src/slang.h |
awk '{ print $3 }'`
slang_major_version=`echo $slang_version |
@@ -2417,7 +2432,8 @@
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=$slang_major_version$slang_minor_version
+slang_minor_version=$slang_mminor_version
slang_version="$slang_major_version.$slang_minor_version"
echo "$ac_t""$slang_version" 1>&6