From 04317d8623d6fece43934fb4dc5ba659fba17e23 Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Sun, 1 Dec 2002 15:30:18 +0000 Subject: [PATCH] Use libtool -module when linking shared libs that will be loaded dynamically. --- ChangeLog | 3 ++- backend/Makefile.in | 3 ++- configure | 17 ++++++++++++----- configure.in | 6 ++++++ 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d991762d8..b9b9ad943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,3 @@ - 2002-12-01 Rene Rebe * backend/avision.h backend/avision.c backend/avision.conf doc/descriptions/avision.desc: updated the Avisin backend - @@ -12,6 +11,8 @@ * TODO: Added sp15c inclusion and low-level buffer prints. Removed avision warning, hpsj5s freeze, hp/libusb, and manpages issues. Updated MacOS X list. + * configure configure.in backend/Makefile.in: Use libtool -module + when linking shared libs that will be loaded dynamically. 2002-11-30 Henning Meier-Geinitz diff --git a/backend/Makefile.in b/backend/Makefile.in index 018eef064..846ce94d5 100644 --- a/backend/Makefile.in +++ b/backend/Makefile.in @@ -47,6 +47,7 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ BACKENDLIBS = @LIBS@ @DL_LIB@ DEFS = @DEFS@ +DYNAMIC_FLAG=@DYNAMIC_FLAG@ LIBTOOL = ../libtool MCOMP = --mode=compile @@ -148,7 +149,7 @@ DISTFILES = abaton.c abaton.conf abaton.h agfafocus.c agfafocus.conf \ libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS) @$(LIBTOOL) $(MLINK) $(CC) -export-dynamic -o $@ $($*_LIBS) \ $(LDFLAGS) $(BACKENDLIBS) $^ -rpath $(libsanedir) \ - -version-info $(V_MAJOR):$(V_REV):$(V_MINOR) + -version-info $(V_MAJOR):$(V_REV):$(V_MINOR) $(DYNAMIC_FLAG) %-s.lo: %-s.c @$(LIBTOOL) $(MCOMP) $(COMPILE) -DSTUBS -DBACKEND_NAME=$* $< diff --git a/configure b/configure index 96f2a3fd9..d27285dd8 100755 --- a/configure +++ b/configure @@ -465,7 +465,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS V_MAJOR V_MINOR V_REV PACKAGE VERSION NUMBER_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CPP EGREP DL_LIB HAVE_GPHOTO2 ac_ct_HAVE_GPHOTO2 ALLOCA LIBOBJS LINKER_RPATH LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LIBTOOL INCLUDES DC210 DC240 DJPEG CANON_PP HPSJ5S GPHOTO2 PINT QCAM V4L NET SANED SM3600 SNAPSCAN DLL_PRELOAD PNM INSTALL_TRANSLATIONS MSGFMT XGETTEXT MSGMERGE MSGCAT SELECTED_BACKENDS SANE_CONFIG_PATH DISTCLEAN_FILES LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS V_MAJOR V_MINOR V_REV PACKAGE VERSION NUMBER_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE CPP EGREP DL_LIB DYNAMIC_FLAG HAVE_GPHOTO2 ac_ct_HAVE_GPHOTO2 ALLOCA LIBOBJS LINKER_RPATH LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LIBTOOL INCLUDES DC210 DC240 DJPEG CANON_PP HPSJ5S GPHOTO2 PINT QCAM V4L NET SANED SM3600 SNAPSCAN DLL_PRELOAD PNM INSTALL_TRANSLATIONS MSGFMT XGETTEXT MSGMERGE MSGCAT SELECTED_BACKENDS SANE_CONFIG_PATH DISTCLEAN_FILES LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -5981,6 +5981,12 @@ done fi +DYNAMIC_FLAG= +if test "${enable_dynamic}" = yes ; then + DYNAMIC_FLAG=-module +fi + + echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6 @@ -8667,7 +8673,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 8670 "configure"' > conftest.$ac_ext + echo '#line 8676 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9185,7 +9191,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:9188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:9194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -10935,7 +10941,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <