From 84b58ebd3bc532d4fb81e3e8cfa1dbf99ae18dbb Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 7 Jul 2012 14:44:29 +0200 Subject: [PATCH] don't mess with libtools --enable-static / --enable-shared tie libspice to -shared ngspice et al to -static and use $(STATIC) elsewhere which is governed by configure.ac --- configure.ac | 7 +++---- src/Makefile.am | 4 +++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 7c34bfa88..3eb088640 100644 --- a/configure.ac +++ b/configure.ac @@ -315,8 +315,6 @@ if test "x$with_tcl" != x && test "x$with_tcl" != xno ; then esac with_x=no - enable_shared=yes - enable_static=no AC_MSG_CHECKING([for tclConfig.sh]) tcl_config_sh="" @@ -434,11 +432,12 @@ EOF done fi + AC_SUBST([STATIC], [-shared]) + else TCL_PACKAGE_PATH="" TCL_LIB_SPEC="" - enable_shared=no - enable_static=yes + AC_SUBST([STATIC], [-static]) fi AM_CONDITIONAL([TCL_MODULE], [test "x$has_tcl_module" = xtrue]) diff --git a/src/Makefile.am b/src/Makefile.am index 8e3d90810..e56a55cec 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -302,6 +302,8 @@ tclspinit: $(srcdir)/tclspinit.in AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices @X_CFLAGS@ +AM_CFLAGS = -static + LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ if WINDOWS @@ -407,7 +409,7 @@ libspice_la_LIBADD += \ misc/libmisc.la \ $(LIBS) -libspice_la_CFLAGS = $(AM_CFLAGS) +libspice_la_CFLAGS = -shared libspice_la_LDFLAGS = -shared -Wl,--version-script=$(srcdir)/tclspice.map if TCLWIN libspice_la_LDFLAGS += -no-undefined