use "cc -shared" on 2.8 and up to create shared libraries.

This commit is contained in:
brad 2000-10-21 20:11:15 +00:00
parent b5775c768a
commit 7dd919076e
3 changed files with 199 additions and 13 deletions

View File

@ -0,0 +1,23 @@
--- autoconf/configure.in.orig Sat Aug 19 22:20:19 2000
+++ autoconf/configure.in Sat Oct 21 15:22:44 2000
@@ -130,6 +130,20 @@
ELF_DEP_LIBS=
fi
;;
+ *openbsd* )
+ ELF_CC="\$(CC)"
+ ELF_CFLAGS="\$(CFLAGS) -fpic"
+ ELF_LINK_CMD="\$(ELF_LINK)"
+ ELF_DEP_LIBS=
+ case "`uname -r`" in
+ 2.[01234567])
+ ELF_LINK="ld -Bshareable -Bforcearchive"
+ ;;
+ *)
+ ELF_LINK="\$(CC) -shared -fpic"
+ ;;
+ esac
+ ;;
* )
echo "Note: ELF compiler for host_os=$host_os may be wrong"
ELF_CC="\$(CC)"

View File

@ -1,15 +1,180 @@
--- configure.orig Sat Aug 19 22:20:18 2000
+++ configure Sat Sep 16 08:32:23 2000
@@ -1890,7 +1890,7 @@
+++ configure Sat Oct 21 15:23:53 2000
@@ -1887,6 +1887,20 @@
ELF_DEP_LIBS=
fi
;;
+ *openbsd* )
+ ELF_CC="\$(CC)"
+ ELF_CFLAGS="\$(CFLAGS) -fpic"
+ ELF_LINK_CMD="\$(ELF_LINK)"
+ ELF_DEP_LIBS=
+ case "`uname -r`" in
+ 2.01234567)
+ ELF_LINK="ld -Bshareable -Bforcearchive"
+ ;;
+ *)
+ ELF_LINK="\$(CC) -shared -fpic"
+ ;;
+ esac
+ ;;
* )
echo "Note: ELF compiler for host_os=$host_os may be wrong"
ELF_CC="\$(CC)"
- ELF_CFLAGS="\$(CFLAGS) -fPIC"
+ ELF_CFLAGS="\$(CFLAGS) -fpic -DPIC"
ELF_LINK="\$(CC) -shared"
ELF_LINK_CMD="\$(ELF_LINK)"
ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
@@ -2240,7 +2240,8 @@
@@ -1923,7 +1937,7 @@
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1927: checking size of short" >&5
+echo "configure:1941: 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
@@ -1931,7 +1945,7 @@
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 1935 "configure"
+#line 1949 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1942,7 +1956,7 @@
exit(0);
}
EOF
-if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1960: \"$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
@@ -1962,7 +1976,7 @@
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1966: checking size of int" >&5
+echo "configure:1980: 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
@@ -1970,7 +1984,7 @@
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 1974 "configure"
+#line 1988 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1981,7 +1995,7 @@
exit(0);
}
EOF
-if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1999: \"$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
@@ -2001,7 +2015,7 @@
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2005: checking size of long" >&5
+echo "configure:2019: 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
@@ -2009,7 +2023,7 @@
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 2013 "configure"
+#line 2027 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2020,7 +2034,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2038: \"$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
@@ -2040,7 +2054,7 @@
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:2044: checking size of float" >&5
+echo "configure:2058: 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
@@ -2048,7 +2062,7 @@
ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <<EOF
-#line 2052 "configure"
+#line 2066 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2059,7 +2073,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2077: \"$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
@@ -2079,7 +2093,7 @@
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:2083: checking size of double" >&5
+echo "configure:2097: 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
@@ -2087,7 +2101,7 @@
ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <<EOF
-#line 2091 "configure"
+#line 2105 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2098,7 +2112,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2116: \"$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
@@ -2127,7 +2141,7 @@
TERMCAP=-ltermcap
echo $ac_n "checking for Terminfo""... $ac_c" 1>&6
-echo "configure:2131: checking for Terminfo" >&5
+echo "configure:2145: checking for Terminfo" >&5
for terminfo_dir in $JD_Terminfo_Dirs
do
if test -d $terminfo_dir
@@ -2230,7 +2244,7 @@
echo $ac_n "checking SLANG_VERSION""... $ac_c" 1>&6
-echo "configure:2234: checking SLANG_VERSION" >&5
+echo "configure:2248: checking SLANG_VERSION" >&5
slang_version=`grep "^#define *SLANG_VERSION " $srcdir/src/slang.h |
awk '{ print $3 }'`
slang_major_version=`echo $slang_version |
@@ -2240,7 +2254,8 @@
slang_mminor_version=`echo $slang_version $slang_major_version $slang_minor_version |
awk '{ print ($1 - $2*10000 - $3*100) }'`

View File

@ -1,5 +1,5 @@
--- src/Makefile.in.orig Sat Aug 19 22:20:31 2000
+++ src/Makefile.in Sat Sep 16 08:33:27 2000
+++ src/Makefile.in Tue Oct 17 22:04:40 2000
@@ -32,11 +32,13 @@
#---------------------------------------------------------------------------
# Directory where library is going to go when installed
@ -15,13 +15,11 @@
DOC_FILES = ../changes.txt ../COPY* ../doc/slangdoc.html ../doc/text/*.txt
#---------------------------------------------------------------------------
# Misc commands (safe to leave these untouched)
@@ -107,11 +109,9 @@
@@ -108,10 +110,8 @@
$(ELFDIR_ELF_LIB): $(ELFDIR) $(CONFIG_H) $(ELFOBJS)
-$(RM) $(ELFDIR_ELF_LIB)
- cd $(ELFDIR); $(ELF_LINK_CMD) -o $(ELFLIB_MAJOR_MINOR) $(OFILES) $(ELF_DEP_LIBS)
cd $(ELFDIR); $(ELF_LINK_CMD) -o $(ELFLIB_MAJOR_MINOR) $(OFILES) $(ELF_DEP_LIBS)
- cd $(ELFDIR); $(RM) $(ELFLIB); $(LN) $(ELFLIB_MAJOR_MINOR) $(ELFLIB)
+ cd $(ELFDIR); $(ELF_LINK) -o $(ELFLIB_MAJOR_MINOR) $(OFILES) $(ELF_DEP_LIBS)
@echo ""
@echo $(ELFLIB_MAJOR_MINOR) created in $(ELFDIR).
- @echo The link $(ELFLIB) to $(ELFLIB_MAJOR_MINOR) was also created.