Commit f45f5d2badc0977c7a83f2c923e786d66820e98c

Thomas de Grivel 2023-03-15T21:22:46

shared libs

diff --git a/c3s/configure b/c3s/configure
index f8dd9d0..fcea77b 100755
--- a/c3s/configure
+++ b/c3s/configure
@@ -43,7 +43,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 CPPFLAGS="${CPPFLAGS:=}"
 ENV_CFLAGS="${CFLAGS:=}"
 DEFAULT_CFLAGS="-O2 -pipe -fPIC"
-LDFLAGS="${LDFLAGS:=}"
+LDFLAGS="-Wl,--allow-shlib-undefined ${LDFLAGS:=}"
 LIBS="${LIBS:=-lm}"
 
 # Common config for all targets
diff --git a/ic3/configure b/ic3/configure
index 4d5d0f6..ddf76da 100755
--- a/ic3/configure
+++ b/ic3/configure
@@ -43,7 +43,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 CPPFLAGS="${CPPFLAGS:=}"
 ENV_CFLAGS="${CFLAGS:=}"
 DEFAULT_CFLAGS="-O2 -pipe -fPIC"
-LDFLAGS="${LDFLAGS:-}"
+LDFLAGS="-Wl,--allow-shlib-undefined ${LDFLAGS:-}"
 LIBS="${LIBS:=-lm}"
 
 # Common config for all targets
diff --git a/libc3/configure b/libc3/configure
index dccbf00..d53873f 100755
--- a/libc3/configure
+++ b/libc3/configure
@@ -35,8 +35,8 @@ OBJECTS_DEBUG="$(c2ext .debug.lo "$LO_SOURCES")"
 CPPFLAGS="${CPPFLAGS:=}"
 ENV_CFLAGS="${CFLAGS:=}"
 DEFAULT_CFLAGS="-O2 -pipe"
-LDFLAGS="-shared ${LDFLAGS:-}"
-LIBS="${LIBS:=-lm} -rpath ${PWD}"
+LDFLAGS="-shared -Wl,--allow-shlib-undefined ${LDFLAGS:-}"
+LIBS="${LIBS:=-lm} -rpath ${PREFIX}/lib"
 
 # Common config for all targets
 CFLAGS="$CFLAGS -W -Wall -Werror -std=c99 -pedantic -fPIC"
diff --git a/test/configure b/test/configure
index 2db741e..4ff1129 100755
--- a/test/configure
+++ b/test/configure
@@ -43,7 +43,7 @@ echo "OBJECTS_DEBUG = $OBJECTS_DEBUG" >> ${CONFIG_MK}
 CPPFLAGS="${CPPFLAGS:=}"
 ENV_CFLAGS="${CFLAGS:=}"
 DEFAULT_CFLAGS="-O2 -pipe"
-LDFLAGS="${LDFLAGS:=}"
+LDFLAGS="-Wl,--allow-shlib-undefined ${LDFLAGS:=}"
 LIBS="${LIBS:=} -lm"
 
 # Common config for all targets