From fa8fd9e9f4a00705a646dfe601bb4c1ac90de4e2 Mon Sep 17 00:00:00 2001 From: Henning Geinitz Date: Thu, 21 Mar 2002 20:26:54 +0000 Subject: [PATCH] Use only shared libraries by default. Fixed file patterns for distclean targets. Henning Meier-Geinitz --- README | 5 ++++- configure | 52 ++++++++++++++++++++++++++-------------------------- configure.in | 3 ++- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/README b/README index bbb6737ad..abfec5afa 100644 --- a/README +++ b/README @@ -68,7 +68,7 @@ configure options, there are the following SANE specific options: --disable-shared Don't use shared libraries. Useful for debugging or when there is a problem building shared libraries. This implicitly turns - on --disable-dynamic as well. + on --disable-dynamic --enable-static as well. --disable-dynamic Disable dynamic loading of backends (in the dll backend). @@ -76,6 +76,9 @@ configure options, there are the following SANE specific options: can find the appropriate header files and libraries ( and -dl). + --enable-static + Use static libraries (turned off by default). + --enable-preload Preload backends into DLL backend. This is useful for debugging, when dynamic loading is unavailable, or to reduce runtime linking diff --git a/configure b/configure index fe004bf26..eed6b7a17 100755 --- a/configure +++ b/configure @@ -22,9 +22,9 @@ ac_help="$ac_help --with-ptal[=DIR] specify the top-level PTAL directory [default=/usr/local]" ac_help="$ac_help - --enable-shared[=PKGS] build shared libraries [default=yes]" + --enable-static[=PKGS] build static libraries [default=no]" ac_help="$ac_help - --enable-static[=PKGS] build static libraries [default=yes]" + --enable-shared[=PKGS] build shared libraries [default=yes]" ac_help="$ac_help --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" ac_help="$ac_help @@ -3995,6 +3995,29 @@ echo "$ac_t""$LINKER_RPATH" 1>&6 +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_static=no +fi + # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" @@ -4018,29 +4041,6 @@ else enable_shared=yes fi -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac -else - enable_static=yes -fi - # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" @@ -4761,7 +4761,7 @@ fi -DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \#* .\#*" +DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \"\#*\" \".\\#*\"" trap '' 1 2 15 diff --git a/configure.in b/configure.in index 178ce04e0..694e496ea 100644 --- a/configure.in +++ b/configure.in @@ -226,6 +226,7 @@ SANE_LINKER_RPATH dnl initialize libtool AC_LIBTOOL_WIN32_DLL +AC_DISABLE_STATIC AC_PROG_LIBTOOL @@ -380,7 +381,7 @@ AC_SUBST(V_MINOR) AC_SUBST(V_REV) AC_SUBST(DLL_PRELOAD) -DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \#* .\#*" +DISTCLEAN_FILES="*~ .*~ *.log *.bak *.old *.orig *.out *.rej \"\#*\" \".\\#*\"" AC_SUBST(DISTCLEAN_FILES) AC_OUTPUT([Makefile lib/Makefile sanei/Makefile frontend/Makefile