File tree Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Expand file tree Collapse file tree 2 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 1+ 2017-07-15 Bruno Haible <bruno@clisp.org>
2+
3+ Don't attempt to build preloadable_libiconv.so when linking statically.
4+ * preload/configure.ac (enable_shared, enable_static): Don't force
5+ shared libraries when LDFLAGS indicates static linking.
6+ (PLUGLIB): Set to empty when is not configured for building shared
7+ libraries.
8+
192017-07-15 Bruno Haible <bruno@clisp.org>
210
311 Get rid of autom4te.cache directories, as far as possible.
Original file line number Diff line number Diff line change 1- dnl Copyright (C) 1999-2009, 2016 Free Software Foundation, Inc.
1+ dnl Copyright (C) 1999-2009, 2016-2017 Free Software Foundation, Inc.
22dnl This file is part of the GNU LIBICONV Library.
33dnl
44dnl The GNU LIBICONV Library is free software; you can redistribute it and/or
@@ -52,20 +52,32 @@ dnl check for build configuration
5252
5353dnl Here we need to build shared object files, regardless whether the user
5454dnl wants to the libiconv library itself to be installed shared or static or
55- dnl both.
56- enable_shared=yes
57- enable_static=no
55+ dnl both. Except that if $LDFLAGS specifies static linking, the creation
56+ dnl of shared object files would fail anyway.
57+ case " $LDFLAGS " in
58+ *" -static "*) ;;
59+ *)
60+ enable_shared=yes
61+ enable_static=no
62+ ;;
63+ esac
5864LT_INIT([ win32-dll] )
5965gl_VISIBILITY
6066
6167dnl check whether OS supports plug libraries
6268
63- case "$host_os" in
64- linux* | solaris* | osf*)
65- PLUGLIB="preloadable_libiconv.so" ;;
66- *)
67- PLUGLIB=""
68- esac
69+ if test "$enable_shared" = yes; then
70+ case "$host_os" in
71+ linux* | solaris* | osf*)
72+ PLUGLIB="preloadable_libiconv.so" ;;
73+ *)
74+ PLUGLIB=""
75+ esac
76+ else
77+ # If libtool is not configured for building shared libraries,
78+ # the build rule for preloadable_libiconv.so would fail.
79+ PLUGLIB=""
80+ fi
6981AC_SUBST ( [ PLUGLIB] )
7082
7183AC_CONFIG_FILES ( [ Makefile] )
You can’t perform that action at this time.
0 commit comments