diff --git a/ChangeLog b/ChangeLog index 9b8cf0ab5..5639e9271 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-20 Holger Vogt + * src/spice.def: for creating dll + * src/makefile.am: libs for tclspice MINGW added + * configure.in: automatically select building shared or static libraries + 2009-04-18 Dietmar Warning * devices/bsim3soi/*.c, *.h, tests/bsim3soi/*.cir, *.out, *.mod, DEVICES: Update to actual version 4.1, contrary to the comment in Berkeley doc's the model diff --git a/configure.in b/configure.in index 96744494d..913b6ee95 100644 --- a/configure.in +++ b/configure.in @@ -257,12 +257,6 @@ dnl Check system we're on , and tune accordingly AC_CANONICAL_HOST -dnl Checks for programs -AC_LIBTOOL_WIN32_DLL -AC_LIBTOOL_DLOPEN -AM_PROG_LIBTOOL -AC_PROG_LIBTOOL - ########################################################################## # @@ -281,124 +275,136 @@ if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then case $host_os in *mingw* ) AM_CONDITIONAL(TCLWIN, true) + AM_CONDITIONAL(NO_HELP, true) AC_DEFINE(HAS_TCLWIN,1,[Tcl Windows]);; *) ;; esac with_x=no - enable_shared=no - - AC_MSG_CHECKING([for tclConfig.sh]) - tcl_config_sh="" - if test "x$with_tcl" != "xyes" ; then - for dir in \ - $with_tcl - do - if test -r "$dir/tclConfig.sh" ; then - tcl_config_sh="$dir/tclConfig.sh" - break - elif test -r "$dir/lib/tclConfig.sh" ; then - tcl_config_sh="$dir/lib/tclConfig.sh" - break - elif test -r "$dir/unix/tclConfig.sh" ; then - tcl_config_sh="$dir/unix/tclConfig.sh" - break - fi - done - else - for dir in \ - $prefix \ - $exec_prefix - do - if test -r "$dir/tclConfig.sh" ; then - tcl_config_sh="$dir/tclConfig.sh" - break - elif test -r "$dir/lib/tclConfig.sh" ; then - tcl_config_sh="$dir/lib/tclConfig.sh" - break - elif test -r "$dir/unix/tclConfig.sh" ; then - tcl_config_sh="$dir/unix/tclConfig.sh" - break - fi - done - + enable_shared=yes + enable_static=no - if test "x$tcl_config_sh" = "x" ; then + AC_MSG_CHECKING([for tclConfig.sh]) + tcl_config_sh="" + if test "x$with_tcl" != "xyes" ; then for dir in \ - `ls -dr /usr/local/tcltk/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/local/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/share/tcltk/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/share/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/share/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/lib/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/lib/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - /usr/local/tcl \ - /usr/local \ - /usr \ - /mingw + $with_tcl do - if test -r "$dir/tclConfig.sh" ; then - echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." - tcl_config_sh="$dir/tclConfig.sh" - break - elif test -r "$dir/lib/tclConfig.sh" ; then - echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." - tcl_config_sh="$dir/lib/tclConfig.sh" - break - fi + if test -r "$dir/tclConfig.sh" ; then + tcl_config_sh="$dir/tclConfig.sh" + break + elif test -r "$dir/lib/tclConfig.sh" ; then + tcl_config_sh="$dir/lib/tclConfig.sh" + break + elif test -r "$dir/unix/tclConfig.sh" ; then + tcl_config_sh="$dir/unix/tclConfig.sh" + break + fi + done + else + for dir in \ + $prefix \ + $exec_prefix + do + if test -r "$dir/tclConfig.sh" ; then + tcl_config_sh="$dir/tclConfig.sh" + break + elif test -r "$dir/lib/tclConfig.sh" ; then + tcl_config_sh="$dir/lib/tclConfig.sh" + break + elif test -r "$dir/unix/tclConfig.sh" ; then + tcl_config_sh="$dir/unix/tclConfig.sh" + break + fi done - fi - fi -AC_MSG_RESULT([${tcl_config_sh}]) + if test "x$tcl_config_sh" = "x" ; then + for dir in \ + `ls -dr /usr/local/tcltk/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/local/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/share/tcltk/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/share/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/share/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/lib/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + `ls -dr /usr/lib/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ + /usr/local/tcl \ + /usr/local \ + /usr \ + /mingw + do + if test -r "$dir/tclConfig.sh" ; then + echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." + tcl_config_sh="$dir/tclConfig.sh" + break + elif test -r "$dir/lib/tclConfig.sh" ; then + echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." + tcl_config_sh="$dir/lib/tclConfig.sh" + break + fi + done + fi + fi + AC_MSG_RESULT([${tcl_config_sh}]) -if test "x$tcl_config_sh" = "x" ; then - echo "can't find Tcl configuration script \"tclConfig.sh\"" - find /usr/ -name 'tclConfig.sh' -exec echo "Should you add --with-tcl={} to ./configure arguments?" \; | sed -re "s/\/tclConfig.sh/ /" - exit 1 -fi + if test "x$tcl_config_sh" = "x" ; then + echo "can't find Tcl configuration script \"tclConfig.sh\"" + find /usr/ -name 'tclConfig.sh' -exec echo "Should you add --with-tcl={} to ./configure arguments?" \; | sed -re "s/\/tclConfig.sh/ /" + exit 1 + fi . $tcl_config_sh -CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC" -CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC" + CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC" + CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC" -AC_CHECK_HEADERS(tcl.h blt.h,,AC_MSG_ERROR(Couldn't find Tcl/BLT headers),) + AC_CHECK_HEADERS(tcl.h blt.h,,AC_MSG_ERROR(Couldn't find Tcl/BLT headers),) -if test ! -x "$TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION" ; then -AC_MSG_ERROR(Couldn't find $TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION) -fi + if test ! -x "$TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION" ; then + AC_MSG_ERROR(Couldn't find $TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION) + fi -AC_MSG_CHECKING(for TCL module BLT) + AC_MSG_CHECKING(for TCL module BLT) rm -f conftest.tcl cat > conftest.tcl << EOF package require BLT; exit; EOF -if ($TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION conftest.tcl; exit) 2>/dev/null -then - AC_MSG_RESULT(Found) -else - AC_MSG_ERROR(Couldn't find BLT) -fi -rm -f conftest.tcl -AC_CHECK_LIB(pthread,pthread_create) -for TCL_PACKAGE_PATH_ELEMENT in $TCL_PACKAGE_PATH ; do - if test -a $TCL_PACKAGE_PATH_ELEMENT ; then - libdir=$TCL_PACKAGE_PATH_ELEMENT - AC_SUBST(libdir) - break - fi -done + if ($TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION conftest.tcl; exit) 2>/dev/null + then + AC_MSG_RESULT(Found) + else + AC_MSG_ERROR(Couldn't find BLT) + fi + rm -f conftest.tcl + + AC_CHECK_LIB(pthread,pthread_create) + + if test -n $libdir ; then + AC_SUBST(libdir) + echo "libraries in "$libdir + fi + + if test -z $libdir ; then + for TCL_PACKAGE_PATH_ELEMENT in $TCL_PACKAGE_PATH ; do + if test -a $TCL_PACKAGE_PATH_ELEMENT ; then + libdir=$TCL_PACKAGE_PATH_ELEMENT + AC_SUBST(libdir) + echo "library in "$libdir + break + fi + done + fi else - TCL_PACKAGE_PATH="" - TCL_LIB_SPEC="" + TCL_PACKAGE_PATH="" + TCL_LIB_SPEC="" + enable_shared=no + enable_static=yes fi AC_SUBST(TCL_PACKAGE_PATH) @@ -410,6 +416,15 @@ AC_SUBST(TCL_LIB_SPEC) # ################################################################# + + +dnl Checks for programs +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_DLOPEN +## AM_PROG_LIBTOOL +AC_PROG_LIBTOOL + + dnl --with-windows : the user wants to use generate the MS WINDOWS executable AC_MSG_CHECKING([whether windows code is enabled]) AC_ARG_WITH(windows, @@ -984,7 +999,6 @@ AC_CONFIG_FILES([Makefile src/spicelib/Makefile src/spicelib/analysis/Makefile src/spicelib/devices/Makefile - ${VLAMKF} src/spicelib/devices/asrc/Makefile src/spicelib/devices/bjt/Makefile src/spicelib/devices/bjt2/Makefile