2010-09-08 19:14:44 +02:00
|
|
|
dnl configure.ac script for ngspice
|
2003-08-11 22:59:48 +02:00
|
|
|
dnl
|
|
|
|
|
dnl This file is part of ngspice.
|
|
|
|
|
dnl
|
|
|
|
|
dnl (Process this file with autoconf to produce a configure script.)
|
2005-05-17 20:31:56 +02:00
|
|
|
dnl
|
|
|
|
|
dnl This configure file has been updated to mostly follow the guidence in the
|
|
|
|
|
dnl GNU Autoconf manual for version 2.59
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Initialisation
|
|
|
|
|
dnl ---------------
|
|
|
|
|
|
|
|
|
|
dnl Initialisation of configure
|
2012-01-28 10:15:13 +01:00
|
|
|
AC_INIT(ngspice,24,http://ngspice.sourceforge.net/bugrep.html)
|
2005-05-17 20:31:56 +02:00
|
|
|
|
|
|
|
|
dnl Unique file in the source directory
|
|
|
|
|
AC_CONFIG_SRCDIR([src/ngspice.c])
|
|
|
|
|
|
|
|
|
|
dnl Ensure a recent version of Autoconf is in use
|
|
|
|
|
dnl Older versions may not work with this script and this will report the
|
|
|
|
|
dnl problem to the user. (2.52 is a guess and might need some adjustment)
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_PREREQ(2.59)
|
2005-05-17 20:31:56 +02:00
|
|
|
|
|
|
|
|
dnl Revison stamp the generated ./configure script
|
|
|
|
|
AC_REVISION($Revision$)
|
2000-10-18 18:29:59 +02:00
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
dnl Create a configuration header
|
2011-12-27 12:31:10 +01:00
|
|
|
AC_CONFIG_HEADER([src/include/ngspice/config.h])
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2005-05-17 20:31:56 +02:00
|
|
|
dnl Initialise automake stuff
|
2011-12-27 12:31:10 +01:00
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror nostdinc])
|
|
|
|
|
|
|
|
|
|
AC_SUBST([AM_CPPFLAGS],['-I. -I$(srcdir) -I$(top_builddir)/src/include'])
|
2000-10-18 18:29:59 +02:00
|
|
|
|
2010-08-14 10:34:49 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
|
2005-05-17 20:31:56 +02:00
|
|
|
dnl Package Options
|
|
|
|
|
dnl ---------------
|
2008-01-07 21:21:31 +01:00
|
|
|
|
|
|
|
|
dnl --enable-ansi: try to force --ansi option to the compiler
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(ansi,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-ansi],[Force --ansi option for compilation]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --disable-debug: remove -g and -Wall option to the compiler
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(debug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-debug],[Add -g option for compilation (default)]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2009-11-16 12:56:31 +01:00
|
|
|
dnl --enable-gprof: add -pg option to the compiler (GCC)
|
|
|
|
|
AC_ARG_ENABLE(gprof,
|
|
|
|
|
AS_HELP_STRING([--enable-gprof],[Produce gprof profiling data in 'gmon.out' (GCC only).]))
|
|
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-checker: add --with-checker-debug option to the compiler
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(checker,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-checkergcc],[Option for compilation with checkergcc]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-gc: Enable Boehm-Weiser Conservative Garbage Collector
|
2003-08-11 22:59:48 +02:00
|
|
|
AC_ARG_ENABLE(checker,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-gc],[Use Boehm-Weiser Conservative Garbage Collector. Disabled by default.]))
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2010-11-06 00:45:56 +01:00
|
|
|
dnl --enable-nobypass: define NOBYPASS for the code
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(nobypass,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-nobypass],[Don't bypass recalculations of slowly changing variables]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-capbypass: define CAPBYPASS for the code
|
2003-08-11 22:59:48 +02:00
|
|
|
AC_ARG_ENABLE(capbypass,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-capbypass],[Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd voltages are unchanged]))
|
2003-08-11 22:59:48 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-nodelimiting: define NODELIMITING for the code
|
2003-08-11 22:59:48 +02:00
|
|
|
AC_ARG_ENABLE(nodelimiting,
|
2010-11-06 14:23:25 +01:00
|
|
|
AS_HELP_STRING([--enable-nodelimiting],[Experimental damping scheme.]))
|
2008-01-07 21:21:31 +01:00
|
|
|
|
|
|
|
|
dnl --enable-predictor: define PREDICTOR for the code
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(predictor,
|
2010-11-06 14:23:25 +01:00
|
|
|
AS_HELP_STRING([--enable-predictor],[Enable a predictor method for convergence.]))
|
2003-08-11 22:59:48 +02:00
|
|
|
|
2010-11-06 00:45:56 +01:00
|
|
|
dnl --enable-newpred: define NEWPRED for the code
|
2004-01-25 18:38:13 +01:00
|
|
|
AC_ARG_ENABLE(newpred,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-newpred],[Enable NEWPRED whatever it is(?)]))
|
2004-01-25 18:38:13 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-newtrunc: define NEWTRUNC for the code
|
2003-08-11 22:59:48 +02:00
|
|
|
AC_ARG_ENABLE(newtrunc,
|
2010-11-06 14:23:25 +01:00
|
|
|
AS_HELP_STRING([--enable-newtrunc],[Enable, how we want extrapolate capacitances.]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-sense2: define WANT_SENSE2 for the code
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(sense2,
|
2010-11-06 14:23:25 +01:00
|
|
|
AS_HELP_STRING([--enable-sense2],[Use spice2 sensitivity analysis.]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-ftedebug: enable frontend debug macros
|
2003-09-25 19:23:26 +02:00
|
|
|
AC_ARG_ENABLE(ftedebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-ftedebug],[Enable ngspice frontend debug]))
|
2003-09-25 19:23:26 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-cpdebug: enable frontend debug macros
|
2003-09-25 19:23:26 +02:00
|
|
|
AC_ARG_ENABLE(cpdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-cpdebug],[Enable ngspice shell debug]))
|
2003-09-25 19:23:26 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-sensdebug: define SENSDEBUG for the code
|
2004-01-25 18:38:13 +01:00
|
|
|
AC_ARG_ENABLE(sensdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-sensdebug],[Debug sensitivity code *SENSDEBUG*]))
|
2004-01-25 18:38:13 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-asdebug: define ASDEBUG for the code
|
2004-01-25 18:38:13 +01:00
|
|
|
AC_ARG_ENABLE(asdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-asdebug],[Debug sensitivity code *ASDEBUG*]))
|
2008-01-07 21:21:31 +01:00
|
|
|
|
|
|
|
|
dnl --enable-stepdebug: define STEPDEBUG for the code
|
2003-08-11 22:59:48 +02:00
|
|
|
AC_ARG_ENABLE(stepdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-stepdebug],[Unknown debug option]))
|
2003-08-23 21:44:55 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-pzdebug: define PZDEBUG for the code
|
2003-08-23 21:44:55 +02:00
|
|
|
AC_ARG_ENABLE(pzdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-pzdebug],[Debug pole/zero code]))
|
2003-08-11 22:59:48 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-blktmsdebug: define D_DBG_BLOCKTIMES for the code
|
2004-01-25 18:38:13 +01:00
|
|
|
AC_ARG_ENABLE(blktmsdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-blktmsdebug],[Debug distortion code *BLOCKTIMES*]))
|
2004-01-25 18:38:13 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-smltmsdebug: define D_DBG_SMALLTIMES for the code
|
2004-01-25 18:38:13 +01:00
|
|
|
AC_ARG_ENABLE(smltmsdebug,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-smltmsdebug],[Debug distortion code *SMALLTIMES*]))
|
2004-01-25 18:38:13 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-smoketest: a smoketest
|
2000-09-05 21:48:22 +02:00
|
|
|
AC_ARG_ENABLE(smoketest,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-smoketest],[Enable smoketest compile]))
|
2000-09-05 21:48:22 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-experimental: define EXPERIMENTAL_CODE for the code
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_ARG_ENABLE(experimental,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-experimental],[Enable some experimental code]))
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl --enable-expdevices: Enable the compilation of experimental devices
|
2003-08-12 22:05:16 +02:00
|
|
|
AC_ARG_ENABLE(expdevices,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-expdevices],[Enable experimental devices (they do not compile)]))
|
2003-08-12 22:05:16 +02:00
|
|
|
|
2003-07-23 21:36:39 +02:00
|
|
|
dnl --enable-xspice: define XSPICE in the code. This is for xspice support
|
|
|
|
|
AC_ARG_ENABLE(xspice,
|
2012-01-02 13:31:22 +01:00
|
|
|
AS_HELP_STRING([--enable-xspice],[Enable XSpice enhancements, (experimental)]))
|
2003-08-11 22:59:48 +02:00
|
|
|
|
|
|
|
|
dnl --enable-cider: define CIDER in the code. This is for CIDER support
|
|
|
|
|
AC_ARG_ENABLE(cider,
|
2012-01-02 13:31:22 +01:00
|
|
|
AS_HELP_STRING([--enable-cider],[Enable CIDER enhancements, (experimental)]))
|
2003-07-23 21:36:39 +02:00
|
|
|
|
2006-02-16 16:03:56 +01:00
|
|
|
dnl --enable-adms: define ADMS in the code. This is for the adms Verilog-A compiler support
|
2006-02-16 12:44:42 +01:00
|
|
|
AC_ARG_ENABLE(adms,
|
2012-01-02 13:31:22 +01:00
|
|
|
AS_HELP_STRING([--enable-adms],[Enable ADMS code models, (experimental)]))
|
2006-02-16 12:44:42 +01:00
|
|
|
|
2011-12-15 21:44:45 +01:00
|
|
|
dnl --enable-adms3: define ADMS in the code. This is for the adms Verilog-A compiler support
|
|
|
|
|
AC_ARG_ENABLE(adms3,
|
2012-01-02 13:31:22 +01:00
|
|
|
AS_HELP_STRING([--enable-adms3],[Enable ADMS code models, (experimental) (adms3)]))
|
|
|
|
|
|
|
|
|
|
dnl --enable-xspice: define XSPICE in the code. This is for xspice support
|
|
|
|
|
AC_ARG_ENABLE(pss,
|
|
|
|
|
AS_HELP_STRING([--enable-pss],[Enable PSS analysis, (very experimental)]))
|
2011-12-15 21:44:45 +01:00
|
|
|
|
2007-05-01 05:41:59 +02:00
|
|
|
dnl --enable-ndev: define NDEV in the code. An interface for external device i.e. numerical device
|
|
|
|
|
AC_ARG_ENABLE(ndev,
|
2012-01-02 13:31:22 +01:00
|
|
|
AS_HELP_STRING([--enable-ndev],[Enable NDEV interface, (experimental)]))
|
2007-05-01 05:41:59 +02:00
|
|
|
|
2003-09-25 19:23:26 +02:00
|
|
|
dnl --enable-cluster: define CLUSTER in the code. This is for cluster support
|
2003-07-23 21:36:39 +02:00
|
|
|
AC_ARG_ENABLE(cluster,
|
2012-01-02 13:31:22 +01:00
|
|
|
AS_HELP_STRING([--enable-cluster],[Enable cluster support, (experimental)]))
|
2003-07-23 21:36:39 +02:00
|
|
|
|
2008-08-21 12:34:29 +02:00
|
|
|
dnl --enable-help: try to force --ansi option to the compiler
|
|
|
|
|
AC_ARG_ENABLE(help,
|
|
|
|
|
AS_HELP_STRING([--enable-help],[Force building nghelp (deprecated)]))
|
|
|
|
|
|
2005-05-06 09:19:36 +02:00
|
|
|
dnl --enable-xgraph: Compile the xgraph plotting program. Default is "no".
|
|
|
|
|
dnl Xgraph is a plotting package for X11 once very popular.
|
2004-01-25 10:00:31 +01:00
|
|
|
AC_ARG_ENABLE(xgraph,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--enable-xgraph],[Enable xgraph compilation.]))
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2004-01-10 22:39:36 +01:00
|
|
|
dnl --with-readline: Includes GNU readline support into CLI. Default is "no".
|
|
|
|
|
AC_ARG_WITH(readline,
|
2008-01-07 21:21:31 +01:00
|
|
|
AS_HELP_STRING([--with-readline[=yes/no]],[Enable GNU readline support for CLI. Default=no.]))
|
|
|
|
|
|
2005-05-06 09:19:36 +02:00
|
|
|
dnl --with-editline: Includes BSD Editline support into CLI. Default is "no".
|
|
|
|
|
AC_ARG_WITH(editline,
|
2008-01-07 21:21:31 +01:00
|
|
|
AS_HELP_STRING([--with-editline[=yes/no]],[Enable BSD editline support for CLI. Default=no.]))
|
|
|
|
|
|
2008-08-27 15:39:05 +02:00
|
|
|
dnl --with-tcl: define TCL_MODULE in the code. This is for tcl support
|
|
|
|
|
AC_ARG_WITH(tcl,
|
2010-10-06 22:06:05 +02:00
|
|
|
[ --with-tcl[=tcldir] Compiles the tcl module instead, experimental, see README.Tcl])
|
2008-08-27 15:39:05 +02:00
|
|
|
|
2005-05-06 09:19:36 +02:00
|
|
|
dnl readline and editline cannot both be enabled
|
|
|
|
|
if test "$with_editline" = "yes"; then
|
|
|
|
|
if test "$with_readline" = "yes"; then
|
|
|
|
|
AC_MSG_ERROR(Readline and editline cannot both be enabled)
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2004-01-10 22:39:36 +01:00
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
dnl Enable maintainer commands only if requested
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
2005-05-17 20:31:56 +02:00
|
|
|
|
|
|
|
|
dnl Compiler checks
|
|
|
|
|
dnl ---------------
|
|
|
|
|
|
2008-09-13 23:14:07 +02:00
|
|
|
ext_CFLAGS="$CFLAGS"
|
|
|
|
|
|
2008-05-21 22:48:39 +02:00
|
|
|
AC_PROG_CC
|
2008-05-20 21:43:01 +02:00
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
dnl Work on compiler options according to system:
|
2008-06-01 22:21:57 +02:00
|
|
|
dnl Set default CFLAGS - only use -Wall if we have gcc
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-19 22:33:34 +01:00
|
|
|
dnl the above AC_PROG_CC may set CFLAGS to "-O2 -g"
|
2000-04-27 22:03:57 +02:00
|
|
|
if test "$enable_debug" = "no"; then
|
2008-05-18 21:25:17 +02:00
|
|
|
if test "x$GCC" = "xyes"; then
|
|
|
|
|
AC_MSG_WARN(Removing debugging option!)
|
2011-07-03 12:08:52 +02:00
|
|
|
CFLAGS="$ext_CFLAGS -O2 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion -s"
|
2008-05-18 21:25:17 +02:00
|
|
|
else
|
|
|
|
|
AC_MSG_WARN(Removing debugging option!)
|
2008-09-13 23:14:07 +02:00
|
|
|
CFLAGS="$ext_CFLAGS -O2"
|
2008-05-18 21:25:17 +02:00
|
|
|
fi
|
2008-01-19 22:33:34 +01:00
|
|
|
else
|
2009-05-02 11:40:33 +02:00
|
|
|
AC_DEFINE(NGDEBUG,1,[Compile with debug info])
|
2008-05-18 21:25:17 +02:00
|
|
|
if test "x$GCC" = "xyes"; then
|
2011-08-07 11:55:12 +02:00
|
|
|
CFLAGS="$ext_CFLAGS -g -O1 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion"
|
2008-05-18 21:25:17 +02:00
|
|
|
else
|
2008-09-13 23:14:07 +02:00
|
|
|
CFLAGS="$ext_CFLAGS -g"
|
2008-05-18 21:25:17 +02:00
|
|
|
fi
|
2005-05-17 20:31:56 +02:00
|
|
|
fi
|
|
|
|
|
|
2009-11-16 12:56:31 +01:00
|
|
|
dnl the profiling option
|
|
|
|
|
if test "$enable_gprof" = "yes"; then
|
|
|
|
|
dnl Probably other compilers support -pg or something similar;
|
|
|
|
|
dnl feel free to extend this to include them.
|
|
|
|
|
if test "$GCC" = "yes"; then
|
|
|
|
|
if test "$enable_shared" = "yes" ; then
|
|
|
|
|
AC_MSG_ERROR(Can't have --enable-gprof without --disable-shared (we
|
|
|
|
|
recommend also using --enable-all-static).)
|
|
|
|
|
fi
|
|
|
|
|
if test ! "$enable_static" = "yes" ; then
|
|
|
|
|
AC_MSG_WARN(We recommend --enable-static with --enable-gprof.)
|
|
|
|
|
fi
|
|
|
|
|
AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).])
|
|
|
|
|
CFLAGS="$CFLAGS -pg"
|
|
|
|
|
LDFLAGS="$LDFLAGS -pg"
|
|
|
|
|
else
|
2010-10-06 22:06:05 +02:00
|
|
|
AC_MSG_ERROR(We only support --enable-gprof with GCC right now.)
|
2009-11-16 12:56:31 +01:00
|
|
|
fi
|
|
|
|
|
fi
|
2000-09-05 21:48:22 +02:00
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
dnl Not sure that this will work....
|
|
|
|
|
if test "$with_checkergcc" = "yes"; then
|
|
|
|
|
CC="checkergcc"
|
2008-01-07 21:21:31 +01:00
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for ANSI-C header files.
|
|
|
|
|
AC_HEADER_STDC
|
2009-11-17 20:29:07 +01:00
|
|
|
AC_CHECK_HEADERS(strings.h)
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
if test "$enable_ansi" = "yes"; then
|
2004-07-09 20:37:25 +02:00
|
|
|
AC_PROG_CC()
|
2007-11-28 18:47:03 +01:00
|
|
|
AC_DIAGNOSE([obsolete],[AM_PROG_CC_STDC:
|
2004-07-09 20:37:25 +02:00
|
|
|
your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
|
|
|
|
|
`ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
|
|
|
|
|
you adjust the code. You can also remove the above call to
|
|
|
|
|
AC_PROG_CC if you already called it elsewhere.])
|
2007-11-28 18:47:03 +01:00
|
|
|
am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
|
2004-07-09 20:37:25 +02:00
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
if test ! "$am_cv_prog_cc_stdc"="yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_WARN(Failed to find Ansi flag!)
|
|
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
fi
|
|
|
|
|
|
2000-09-05 21:48:22 +02:00
|
|
|
if test "$enable_smoketest" = "yes"; then
|
|
|
|
|
dnl CFLAGS="$CFLAGS -Werror"
|
|
|
|
|
CFLAGS="$CFLAGS -pedantic -W -Wmissing-prototypes"
|
|
|
|
|
CFLAGS="$CFLAGS -Wstrict-prototypes -Wtraditional"
|
|
|
|
|
CFLAGS="$CFLAGS -Wconversion -Wshadow -Wpointer-arith"
|
|
|
|
|
CFLAGS="$CFLAGS -Wcast-qual -Wcast-align -Wwrite-strings"
|
|
|
|
|
CFLAGS="$CFLAGS -Waggregate-return -fshort-enums -fno-common"
|
|
|
|
|
CFLAGS="$CFLAGS -Wnested-externs -Dinline= -g -O4"
|
|
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
dnl Check system we're on , and tune accordingly
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
2010-09-19 10:25:46 +02:00
|
|
|
dnl Expand the prefix variable
|
|
|
|
|
if eval "test x$prefix = xNONE"; then
|
|
|
|
|
dnl with the MS WINDOWS executable we suggest C:/Spice/bin as *.exe-path
|
|
|
|
|
if test "$with_windows" = "yes"; then
|
|
|
|
|
dprefix="C:/Spice"
|
|
|
|
|
prefix=$dprefix
|
|
|
|
|
else
|
|
|
|
|
dprefix=$ac_default_prefix
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
dprefix=$prefix
|
|
|
|
|
fi
|
2008-09-09 00:18:28 +02:00
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
#
|
|
|
|
|
# tcl libraries test
|
|
|
|
|
#
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
|
|
dnl
|
|
|
|
|
dnl The tclSpice options
|
|
|
|
|
dnl
|
|
|
|
|
if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then
|
2010-08-14 10:34:49 +02:00
|
|
|
has_tcl_module=true
|
2008-09-09 00:18:28 +02:00
|
|
|
AC_DEFINE(TCL_MODULE,1,[Tcl Module])
|
2008-12-31 15:42:49 +01:00
|
|
|
case $host_os in
|
|
|
|
|
*mingw* )
|
2010-08-18 19:13:26 +02:00
|
|
|
has_tclwin=true
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_help=true
|
2008-12-31 15:42:49 +01:00
|
|
|
AC_DEFINE(HAS_TCLWIN,1,[Tcl Windows]);;
|
2010-08-18 19:13:26 +02:00
|
|
|
*cygwin* )
|
2010-10-06 22:06:05 +02:00
|
|
|
has_tclcyg=true ;;
|
2008-12-31 15:42:49 +01:00
|
|
|
*)
|
2010-10-06 22:06:05 +02:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
2008-09-09 00:18:28 +02:00
|
|
|
with_x=no
|
2009-04-20 22:54:25 +02:00
|
|
|
enable_shared=yes
|
|
|
|
|
enable_static=no
|
2008-09-09 00:18:28 +02:00
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
AC_MSG_CHECKING([for tclConfig.sh])
|
|
|
|
|
tcl_config_sh=""
|
|
|
|
|
if test "x$with_tcl" != "xyes" ; then
|
2008-09-09 00:18:28 +02:00
|
|
|
for dir in \
|
2009-04-20 22:54:25 +02:00
|
|
|
$with_tcl
|
2008-09-09 00:18:28 +02:00
|
|
|
do
|
2009-04-20 22:54:25 +02:00
|
|
|
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
|
2008-09-09 00:18:28 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
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
|
2008-09-09 00:18:28 +02:00
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
AC_MSG_RESULT([${tcl_config_sh}])
|
2008-09-09 00:18:28 +02:00
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
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
|
2008-09-09 00:18:28 +02:00
|
|
|
|
|
|
|
|
. $tcl_config_sh
|
|
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC"
|
|
|
|
|
CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
|
2008-09-09 00:18:28 +02:00
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
AC_CHECK_HEADERS(tcl.h blt.h,,AC_MSG_ERROR(Couldn't find Tcl/BLT headers),)
|
2008-09-09 00:18:28 +02:00
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
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
|
2008-09-09 00:18:28 +02:00
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
AC_MSG_CHECKING(for TCL module BLT)
|
2008-09-09 00:18:28 +02:00
|
|
|
rm -f conftest.tcl
|
|
|
|
|
cat > conftest.tcl << EOF
|
|
|
|
|
package require BLT;
|
|
|
|
|
exit;
|
|
|
|
|
EOF
|
|
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
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
|
2008-09-09 00:18:28 +02:00
|
|
|
|
|
|
|
|
else
|
2009-04-20 22:54:25 +02:00
|
|
|
TCL_PACKAGE_PATH=""
|
|
|
|
|
TCL_LIB_SPEC=""
|
|
|
|
|
enable_shared=no
|
|
|
|
|
enable_static=yes
|
2008-09-09 00:18:28 +02:00
|
|
|
fi
|
|
|
|
|
|
2010-08-14 10:34:49 +02:00
|
|
|
AM_CONDITIONAL([TCL_MODULE], [test x$has_tcl_module = xtrue])
|
|
|
|
|
AM_CONDITIONAL([TCLWIN], [test x$has_tclwin = xtrue])
|
2010-08-18 19:13:26 +02:00
|
|
|
AM_CONDITIONAL([TCLCYG], [test x$has_tclcyg = xtrue])
|
2010-10-06 22:06:05 +02:00
|
|
|
|
2008-09-09 00:18:28 +02:00
|
|
|
AC_SUBST(TCL_PACKAGE_PATH)
|
|
|
|
|
AC_SUBST(TCL_LIB_SPEC)
|
|
|
|
|
##################################################################
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#End of tcl libraries test
|
|
|
|
|
#
|
|
|
|
|
#################################################################
|
|
|
|
|
|
2009-04-20 22:54:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for programs
|
|
|
|
|
AC_LIBTOOL_WIN32_DLL
|
|
|
|
|
AC_LIBTOOL_DLOPEN
|
2010-11-16 20:38:18 +01:00
|
|
|
AM_PROG_CC_C_O
|
2009-04-20 22:54:25 +02:00
|
|
|
## AM_PROG_LIBTOOL
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
|
|
|
2002-01-03 23:44:21 +01:00
|
|
|
dnl --with-windows : the user wants to use generate the MS WINDOWS executable
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_MSG_CHECKING([whether windows code is enabled])
|
2002-01-03 23:44:21 +01:00
|
|
|
AC_ARG_WITH(windows,
|
2005-05-17 20:31:56 +02:00
|
|
|
AS_HELP_STRING([--with-windows],[MS WINDOWS executable]),
|
2008-01-07 21:21:31 +01:00
|
|
|
[if test "$with_windows" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE([HAS_WINDOWS],[1],[define to specify MS Windows executable])
|
|
|
|
|
fi],
|
|
|
|
|
[with_windows="no"]
|
2002-01-03 23:44:21 +01:00
|
|
|
)
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_MSG_RESULT($with_windows)
|
|
|
|
|
AM_CONDITIONAL(WINDOWS, test x$with_windows = xyes)
|
2002-01-03 23:44:21 +01:00
|
|
|
|
|
|
|
|
case $with_windows in
|
|
|
|
|
yes )
|
|
|
|
|
AC_DEFINE(X_DISPLAY_MISSING)
|
|
|
|
|
AC_MSG_RESULT(No X display!)
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_x=true
|
2008-08-21 12:34:29 +02:00
|
|
|
if test "x$enable_help" = "xyes"; then
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_help=false
|
2008-08-21 12:34:29 +02:00
|
|
|
else
|
2012-04-06 16:19:49 +02:00
|
|
|
has_no_help=true
|
2008-08-21 12:34:29 +02:00
|
|
|
fi
|
2003-07-27 22:44:57 +02:00
|
|
|
CFLAGS="$CFLAGS -mwindows";;
|
2003-08-12 13:41:56 +02:00
|
|
|
* )
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2008-09-01 23:10:18 +02:00
|
|
|
dnl Check for /proc (virtual process information file system)
|
|
|
|
|
AC_CHECK_HEADERS( /proc/meminfo)
|
|
|
|
|
|
|
|
|
|
dnl Checks for X11 header files and libraries - X11 support can be disabled
|
|
|
|
|
dnl by passing the '--without-x' option to configure:
|
|
|
|
|
|
|
|
|
|
dnl Try to locate the X-Windows include files and libraries
|
2012-04-06 16:19:49 +02:00
|
|
|
dnl will set no_x="yes" or no_x=""
|
2008-09-01 23:10:18 +02:00
|
|
|
AC_PATH_X
|
2012-04-06 16:19:49 +02:00
|
|
|
|
|
|
|
|
dnl will set X_CFLAGS, X_LIBS, and might define X_DISPLAY_MISSING
|
2008-09-01 23:10:18 +02:00
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
|
AC_FUNC_CLOSEDIR_VOID
|
|
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
|
|
|
AC_FUNC_SETVBUF_REVERSED
|
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
|
|
|
|
|
|
dnl Check if the user wants to use the appropriate rpath commands to compile in
|
|
|
|
|
dnl the shared library path for the X libraries. This is off by default since
|
|
|
|
|
dnl that is how it has been historically. Using --enable-rpath will turn this on
|
|
|
|
|
|
|
|
|
|
_use_rpath=no
|
|
|
|
|
AC_MSG_CHECKING([if hardcoding of the X11 runtime library path is desired])
|
|
|
|
|
AC_ARG_ENABLE([rpath],
|
|
|
|
|
[ --enable-rpath Enable hardcoding the X11 runtime library path [default=disabled]],
|
|
|
|
|
[
|
|
|
|
|
if test "X$enable_rpath" = "Xno" ; then
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
_use_rpath=no
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
_use_rpath=yes
|
|
|
|
|
fi
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
_use_rpath=no
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if test "X$_use_rpath" = "Xyes" ; then
|
|
|
|
|
# Try to figure out if we need -Rpath for finding X11 libs
|
|
|
|
|
# at runtime. Why autoconf doesn't already do this, I don't
|
|
|
|
|
# know...
|
|
|
|
|
xlib_path=""
|
|
|
|
|
for p in $X_LDFLAGS ; do
|
|
|
|
|
case $p in
|
|
|
|
|
-L*)
|
|
|
|
|
xlib_path="$xlib_path $p"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
_save_LIBS=$LIBS
|
|
|
|
|
LIBS="$LIBS $X_LDFLAGS"
|
|
|
|
|
rpath=""
|
|
|
|
|
for fl in "-Wl,-rpath " "-Wl,--rpath " "-rpath " "--rpath " "-Wl,-R" "-R" "-R " ; do
|
|
|
|
|
xlib_rpath=`echo $xlib_path | sed "s/-L/$fl/g"`
|
|
|
|
|
LIBS="$_save_LIBS $X_LIBS $xlib_rpath"
|
|
|
|
|
AC_MSG_CHECKING([if the compiler accepts ${fl}path for runtime libraries])
|
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM()],
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
rpath=$fl,
|
|
|
|
|
AC_MSG_RESULT([no]))
|
|
|
|
|
test -n "$rpath" && break
|
|
|
|
|
done
|
|
|
|
|
if test -n "$rpath"; then
|
|
|
|
|
X_LDFLAGS="$X_LDFLAGS $xlib_rpath"
|
|
|
|
|
fi
|
|
|
|
|
LIBS=$_save_LIBS
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
dnl Checks for X libraries - if X11 wasn't found then don't make following
|
|
|
|
|
dnl tests and compile without X11 support - otherwise, check if the following
|
|
|
|
|
dnl libraries are present (error if they are not)
|
|
|
|
|
dnl In CYGWIN library ordering has to be changed. Is this compatible to LINUX?
|
|
|
|
|
dnl XShmAttach is a struct in CYGWIN, not a function
|
|
|
|
|
dnl SJB: 13th march 2005
|
|
|
|
|
dnl Library order is giving linker warnings on MacOSX
|
|
|
|
|
dnl It's not clear to me which order is required for Cygwin (see comment above)
|
|
|
|
|
dnl and neither can I find any authoritative answer for the correct link order
|
|
|
|
|
dnl for MacOSX or Linux, but
|
|
|
|
|
dnl -lXaw -lXmu -lXt -lXext -lX11
|
|
|
|
|
dnl seems to be the popular choice.
|
|
|
|
|
dnl (The previous order was -lX11 -lXt -lXext -lXmu -lXaw)
|
2012-04-06 16:19:49 +02:00
|
|
|
|
|
|
|
|
if test "x$no_x" != "xyes" ; then
|
2008-09-01 23:10:18 +02:00
|
|
|
AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS -lXaw",AC_MSG_ERROR(Couldn't find Xaw library),$X_LIBS $X_EXTRA_LIBS)
|
|
|
|
|
AC_CHECK_LIB(Xmu,main,X_LIBS="$X_LIBS -lXmu",AC_MSG_ERROR(Couldn't find Xmu library), $X_LIBS $X_EXTRA_LIBS)
|
|
|
|
|
X_LIBS="$X_LIBS -lXt"
|
|
|
|
|
AC_CHECK_LIB(Xext, XShmAttach,X_LIBS="$X_LIBS -lXext",AC_MSG_ERROR(Couldn't find Xext library), $X_LIBS $X_EXTRA_LIBS)
|
|
|
|
|
X_LIBS="$X_LIBS -lX11"
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_x=false
|
2008-09-01 23:10:18 +02:00
|
|
|
else
|
|
|
|
|
AC_DEFINE(X_DISPLAY_MISSING)
|
|
|
|
|
AC_MSG_RESULT(No X display!)
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_x=true
|
2010-10-06 22:06:05 +02:00
|
|
|
fi
|
|
|
|
|
|
2008-09-01 23:10:18 +02:00
|
|
|
if ( test "x$enable_help" = "xyes" ) && ! ( test "$no_x" = "yes" ) ; then
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_help=false
|
2008-09-01 23:10:18 +02:00
|
|
|
else
|
2010-08-14 10:34:49 +02:00
|
|
|
has_no_help=true
|
2008-09-01 23:10:18 +02:00
|
|
|
fi ;;
|
|
|
|
|
|
|
|
|
|
esac
|
2010-08-14 10:34:49 +02:00
|
|
|
# end of case --with-windows
|
2008-09-01 23:10:18 +02:00
|
|
|
|
2010-08-14 10:34:49 +02:00
|
|
|
AM_CONDITIONAL([NO_X], [test x$has_no_x = xtrue])
|
|
|
|
|
AM_CONDITIONAL([NO_HELP], [test x$has_no_help = xtrue])
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
dnl Check for a few typdefs:
|
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
|
|
2010-09-30 22:26:57 +02:00
|
|
|
dnl sighandler_t is the type of the signal handler on GNU variants,
|
|
|
|
|
dnl sig_t is the type of a signal handler on 4.4BSD's,
|
|
|
|
|
dnl other systems use __sighandler_t.
|
|
|
|
|
AC_CHECK_TYPES([sighandler_t, sig_t, __sighandler_t], , ,
|
|
|
|
|
[#include <sys/types.h>
|
|
|
|
|
#include <signal.h> ])
|
|
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
dnl Check for a few libraries and headers:
|
|
|
|
|
AC_HEADER_DIRENT
|
2009-08-04 21:27:28 +02:00
|
|
|
AC_CHECK_HEADERS(unistd.h ctype.h pwd.h fcntl.h sys/ioctl.h stropts.h)
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
|
AC_HEADER_STAT
|
|
|
|
|
|
2008-05-18 21:25:17 +02:00
|
|
|
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stddef.h sys/file.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/io.h])
|
2008-01-07 21:21:31 +01:00
|
|
|
|
|
|
|
|
|
2005-03-17 22:22:33 +01:00
|
|
|
dnl Check time and resources headers and functions:
|
2000-04-27 22:03:57 +02:00
|
|
|
AC_HEADER_TIME
|
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
AC_STRUCT_TIMEZONE
|
|
|
|
|
AC_CHECK_FUNCS(localtime)
|
2002-01-03 23:44:21 +01:00
|
|
|
|
2010-06-24 12:25:05 +02:00
|
|
|
AC_CHECK_FUNCS(ftime gettimeofday)
|
|
|
|
|
dnl Do not use time or getrusage function for CPU time measurement under OpenMP
|
2012-05-28 17:51:28 +02:00
|
|
|
if test "$enable_openmp" != "yes"; then
|
2010-06-24 12:25:05 +02:00
|
|
|
AC_CHECK_FUNCS(time getrusage)
|
|
|
|
|
fi
|
|
|
|
|
AC_CHECK_FUNCS(utimes)
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_FUNCS(getrlimit ulimit, break)
|
|
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS([endpwent gethostbyname memset select socket strdup strerror strncasecmp strstr strtol])
|
2007-12-15 17:35:35 +01:00
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
dnl Look for termios first (posix)
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_HEADERS(termios.h termio.h sgtty.h, break)
|
2002-01-03 23:44:21 +01:00
|
|
|
AC_CHECK_FUNCS(isatty tcgetattr tcsetattr)
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
dnl Check for a few functions:
|
2004-07-09 20:37:25 +02:00
|
|
|
AC_FUNC_FORK([])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_FUNCS(access bcopy bzero qsort dup2 popen)
|
|
|
|
|
AC_CHECK_FUNCS(strchr index, break)
|
|
|
|
|
AC_CHECK_FUNCS(strrchr rindex, break)
|
|
|
|
|
AC_CHECK_FUNCS(getcwd getwd, break)
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_MSG_RESULT(Checking mathematical features of the system:)
|
|
|
|
|
dnl Look for math library:
|
2007-11-28 18:47:03 +01:00
|
|
|
AC_CHECK_LIB(m, sqrt)
|
2008-05-18 21:25:17 +02:00
|
|
|
AC_CHECK_HEADERS(float.h limits.h values.h ieeefp.h)
|
2000-04-27 22:03:57 +02:00
|
|
|
|
|
|
|
|
dnl Check for a few mathematical functions:
|
2009-01-01 21:44:49 +01:00
|
|
|
AC_CHECK_FUNCS(erfc logb scalb scalbn asinh acosh atanh finite)
|
|
|
|
|
dnl According POSIX we should look for macros first
|
|
|
|
|
AC_CHECK_DECLS([isinf], [], [], [[#include <math.h>]])
|
|
|
|
|
AC_CHECK_DECLS([isnan], [], [], [[#include <math.h>]])
|
|
|
|
|
dnl But may be we have still functions
|
|
|
|
|
if test "$ac_cv_have_decl_isinf" != yes; then
|
|
|
|
|
AC_CHECK_FUNC(isinf)
|
|
|
|
|
fi
|
|
|
|
|
if test "$ac_cv_have_decl_isnan" != yes; then
|
|
|
|
|
AC_CHECK_FUNC(isnan)
|
|
|
|
|
fi
|
2008-01-12 17:24:22 +01:00
|
|
|
|
2005-04-04 12:41:20 +02:00
|
|
|
dnl If user enables garbage collection, look for garbage collector
|
2008-08-27 15:39:05 +02:00
|
|
|
if test "$TCL_PACKAGE_PATH" = ""; then
|
|
|
|
|
if test "$enable_gc" = "yes"; then
|
|
|
|
|
AC_MSG_RESULT(Checking for the presence of the Garbage Collector:)
|
|
|
|
|
AC_CHECK_LIB(gc,GC_malloc,
|
|
|
|
|
AC_DEFINE(HAVE_LIBGC,[],[Define if we want garbage collection enabled])
|
|
|
|
|
LIBS="$LIBS -lgc")
|
|
|
|
|
fi
|
2005-04-04 12:41:20 +02:00
|
|
|
fi
|
2005-05-17 23:46:26 +02:00
|
|
|
dnl check, if we have sigsetjmp and siglongjmp.
|
|
|
|
|
dnl A trivial AC_CHECK_FUNCS(sigsetjmp) won't do because sigsetjmp() might be a
|
|
|
|
|
dnl macro declared in <setjmp.h>. (joze)
|
|
|
|
|
AC_MSG_CHECKING(for sigsetjmp)
|
|
|
|
|
AC_TRY_LINK([#include <setjmp.h>],[jmp_buf env; sigsetjmp(env, 1);],
|
|
|
|
|
[AC_MSG_RESULT(yes)
|
|
|
|
|
AC_DEFINE(HAVE_SIGSETJMP,[],[Define if we have sigsetjmp().])],
|
|
|
|
|
AC_MSG_RESULT(no) )
|
|
|
|
|
|
2007-11-28 18:47:03 +01:00
|
|
|
dnl Check for some headers (asprintf, dirname, etc.)
|
|
|
|
|
AC_CHECK_HEADERS(libiberty.h libgen.h)
|
|
|
|
|
|
2001-04-16 11:58:25 +02:00
|
|
|
dnl Check for the asprintf function:
|
2008-01-12 17:24:22 +01:00
|
|
|
AC_CHECK_FUNCS(asprintf,,AC_CHECK_LIB(iberty,asprintf,AC_DEFINE(HAVE_ASPRINTF,1,[Have asprintf in libiberty]) LIBS="$LIBS -liberty"))
|
2001-04-16 11:58:25 +02:00
|
|
|
|
2007-11-25 20:59:17 +01:00
|
|
|
dnl Check for the snprintf function:
|
2007-11-28 18:47:03 +01:00
|
|
|
if test "$ac_cv_func_asprintf" = no ; then
|
|
|
|
|
AC_CHECK_FUNCS(snprintf)
|
|
|
|
|
fi
|
2007-11-25 20:59:17 +01:00
|
|
|
|
2007-11-28 18:47:03 +01:00
|
|
|
dnl Check for the dirname function:
|
2008-01-12 17:24:22 +01:00
|
|
|
AC_CHECK_FUNCS(dirname,,AC_CHECK_LIB(gen,dirname,AC_DEFINE(HAVE_DIRNAME,1,[Have dirname in libgen]) LIBS="$LIBS -lgen"))
|
2000-10-14 23:49:25 +02:00
|
|
|
|
2009-04-12 23:08:18 +02:00
|
|
|
AC_CHECK_HEADERS(getopt.h)
|
|
|
|
|
AC_CHECK_FUNC(getopt_long, getopt_long=true)
|
|
|
|
|
if test "$getopt_long" = "true"; then
|
|
|
|
|
AC_DEFINE(HAVE_GETOPT_LONG,1,[Have fcn getopt_long()])
|
|
|
|
|
fi
|
2002-01-03 23:44:21 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE_UNQUOTED(NGSPICEBINDIR,"`echo $dprefix/bin`",[Define the directory for executables])
|
2009-04-25 22:29:10 +02:00
|
|
|
AC_DEFINE_UNQUOTED(NGSPICEDATADIR,"`echo $dprefix/share/ngspice`",[Define the directory for architecture independent data files])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE_UNQUOTED(NGSPICEBUILDDATE,"`date`",[Define the build date])
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2002-01-03 23:44:21 +01:00
|
|
|
if test "$with_windows" = "yes"; then
|
2003-07-27 22:44:57 +02:00
|
|
|
AC_MSG_RESULT(WINDOWS code enabled)
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_FUNCS([memmove])
|
2002-01-03 23:44:21 +01:00
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
# Recapitulate settings:
|
|
|
|
|
AC_MSG_RESULT(Settings which were chosen:)
|
|
|
|
|
|
2000-04-27 22:03:57 +02:00
|
|
|
if test "$enable_sense2" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(WANT_SENSE2,[],[Define if we want spice2 sensitivity analysis])
|
|
|
|
|
AC_MSG_RESULT(Spice2 sensitivity analysis enabled)
|
2000-04-27 22:03:57 +02:00
|
|
|
fi
|
|
|
|
|
if test "$enable_nobypass" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(NOBYPASS,[],[Define if we want NOBYPASS])
|
|
|
|
|
AC_MSG_RESULT(NOBYPASS option enabled)
|
2000-04-27 22:03:57 +02:00
|
|
|
fi
|
2003-08-12 00:32:15 +02:00
|
|
|
if test "$enable_capbypass" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(CAPBYPASS,[],[Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(CAPBYPASS option enabled)
|
|
|
|
|
fi
|
2003-08-11 22:59:48 +02:00
|
|
|
if test "$enable_nodelimiting" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(NODELIMITING,[],[Experimental code never implemented to damp Newton iterations])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(NODELIMITING option enabled)
|
|
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
if test "$enable_predictor" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(PREDICTOR,[],[Define if we want predictor algorithm])
|
|
|
|
|
AC_MSG_RESULT(PREDICTOR algorithm enabled)
|
2000-04-27 22:03:57 +02:00
|
|
|
fi
|
2004-01-25 18:38:13 +01:00
|
|
|
if test "$enable_newpred" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(NEWPRED,[],[Define if you want to discover :)])
|
|
|
|
|
AC_MSG_RESULT(NEWPRED enabled)
|
2004-01-25 18:38:13 +01:00
|
|
|
fi
|
2003-08-11 22:59:48 +02:00
|
|
|
if test "$enable_newtrunc" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(NEWTRUNC,[],[Do not trigger unwanted traps by default])
|
|
|
|
|
AC_MSG_RESULT(New truncation error calculation enabled)
|
2008-01-07 21:21:31 +01:00
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
if test "$enable_experimental" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(EXPERIMENTAL_CODE,[],[Define if we want some experimental code])
|
|
|
|
|
AC_MSG_RESULT(EXPERIMENTAL_CODE enabled)
|
2000-04-27 22:03:57 +02:00
|
|
|
fi
|
2003-09-25 19:23:26 +02:00
|
|
|
if test "$enable_cpdebug" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(CPDEBUG,[],[Define if you want to debug ngspice shell])
|
|
|
|
|
AC_MSG_RESULT(WARNING: Shell debug is enabled)
|
2003-09-25 19:23:26 +02:00
|
|
|
fi
|
2001-12-02 21:12:56 +01:00
|
|
|
if test "$enable_ftedebug" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(FTEDEBUG,[],[Define if you want to debug frontend])
|
|
|
|
|
AC_MSG_RESULT(WARNING: Frontend debug is enabled)
|
2001-12-02 21:12:56 +01:00
|
|
|
fi
|
2003-08-11 22:59:48 +02:00
|
|
|
if test "$enable_sensdebug" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(SENSDEBUG,[],[Define if we want debug sensititvity analysis])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(WARNING: Sensitivity code debug *SENSDEBUG* is enabled)
|
2004-01-25 18:38:13 +01:00
|
|
|
fi
|
|
|
|
|
if test "$enable_asdebug" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(ASDEBUG,[],[Define if we want debug sensitivity analysis])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(WARNING: Sensitivity code debug *ASDEBUG* is enabled)
|
2003-08-11 22:59:48 +02:00
|
|
|
fi
|
|
|
|
|
if test "$enable_stepdebug" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(STEPDEBUG,[],[Define if we want stepdebug])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(WARNING: STEPDEBUG debug is enabled)
|
2003-08-11 22:59:48 +02:00
|
|
|
fi
|
2003-08-23 21:44:55 +02:00
|
|
|
if test "$enable_pzdebug" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(PZDEBUG,[],[Define if you want to debug pole-zero analysis])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(WARNING: Pole/Zero analysis debug is enabled)
|
2003-08-23 21:44:55 +02:00
|
|
|
fi
|
2012-01-02 13:31:22 +01:00
|
|
|
if test "$enable_pss" = "yes"; then
|
|
|
|
|
AC_DEFINE(WITH_PSS,[],[Define if you want PSS analysis])
|
|
|
|
|
fi
|
2004-01-25 18:38:13 +01:00
|
|
|
if test "$enable_blktmsdebug" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(D_DBG_BLOCKTIMES,[],[Define if we want debug distortion analysis (BLOCKTIMES)])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(WARNING: Distortion analysis debug *D_DBG_BLOCKTIMES* is enabled)
|
2004-01-25 18:38:13 +01:00
|
|
|
fi
|
|
|
|
|
if test "$enable_smltmsdebug" = "yes"; then
|
2005-05-17 20:31:56 +02:00
|
|
|
AC_DEFINE(D_DBG_SMALLTIMES,[],[Define if we want debug distortion analysis (SMALLTIMES)])
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(WARNING: Distortion analysis debug *D_DBG_SMALLTIMES* is enabled)
|
2004-01-25 18:38:13 +01:00
|
|
|
fi
|
2004-01-25 10:00:31 +01:00
|
|
|
if test "$enable_xgraph" = "yes"; then
|
|
|
|
|
AC_MSG_RESULT(Xgraph compilation enabled.)
|
|
|
|
|
AC_CONFIG_SUBDIRS(xgraph)
|
|
|
|
|
XGRAPHDIR="xgraph"
|
2005-08-24 00:13:47 +02:00
|
|
|
NOTXGRAPH=""
|
2004-01-25 10:00:31 +01:00
|
|
|
else
|
|
|
|
|
XGRAPHDIR=""
|
2005-08-24 00:13:47 +02:00
|
|
|
NOTXGRAPH="xgraph"
|
2008-01-07 21:21:31 +01:00
|
|
|
fi
|
2004-01-25 10:00:31 +01:00
|
|
|
|
|
|
|
|
AC_SUBST(XGRAPHDIR)
|
2005-08-24 00:13:47 +02:00
|
|
|
AC_SUBST(NOTXGRAPH)
|
2004-01-25 10:00:31 +01:00
|
|
|
|
2010-10-06 22:06:05 +02:00
|
|
|
AC_CHECK_PROGS(YACC, 'bison -y' byacc yacc)
|
2010-08-14 10:34:49 +02:00
|
|
|
|
2010-09-19 10:25:46 +02:00
|
|
|
################# XSPICE ##################################################
|
2003-07-23 21:36:39 +02:00
|
|
|
dnl Add new code models to the build by pointing to them here.
|
2011-12-29 15:32:47 +01:00
|
|
|
|
2003-07-23 21:36:39 +02:00
|
|
|
if test "$enable_xspice" = "yes"; then
|
2010-08-14 10:34:49 +02:00
|
|
|
if test -z "${YACC}" ; then
|
|
|
|
|
AC_MSG_ERROR([XSPICE build requires bison, byacc or yacc parser generator])
|
|
|
|
|
fi
|
2003-07-23 21:36:39 +02:00
|
|
|
AC_MSG_RESULT(X-Spice features included)
|
2008-01-12 17:24:22 +01:00
|
|
|
AC_DEFINE(XSPICE, [1], [The xspice enhancements])
|
2010-08-14 10:34:49 +02:00
|
|
|
dnl Define variables for LEX
|
|
|
|
|
AC_CHECK_PROGS(LEX, flex lex)
|
|
|
|
|
if test -z $LEX ; then
|
|
|
|
|
AC_MSG_ERROR(Flex is required for building XSPICE)
|
|
|
|
|
fi
|
2005-08-22 23:00:02 +02:00
|
|
|
case $host_os in
|
2008-01-12 17:24:22 +01:00
|
|
|
*mingw* )
|
|
|
|
|
AC_DEFINE([IPC_DEBUG_VIA_STDIO], [1], [Client-Server only via stdio.])
|
2010-11-16 20:31:33 +01:00
|
|
|
XSPICEDLLIBS="";;
|
2008-01-12 17:24:22 +01:00
|
|
|
*cygwin* )
|
|
|
|
|
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
|
2010-11-16 20:31:33 +01:00
|
|
|
XSPICEDLLIBS="" ;;
|
2009-05-06 23:30:26 +02:00
|
|
|
*freebsd* )
|
2009-05-06 23:43:47 +02:00
|
|
|
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
|
2010-11-16 20:31:33 +01:00
|
|
|
XSPICEDLLIBS="";;
|
2009-05-06 23:43:47 +02:00
|
|
|
*openbsd* )
|
2009-05-06 23:30:26 +02:00
|
|
|
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
|
2010-11-16 20:31:33 +01:00
|
|
|
XSPICEDLLIBS="";;
|
2005-08-22 23:00:02 +02:00
|
|
|
* )
|
2008-01-12 17:24:22 +01:00
|
|
|
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
|
2010-11-16 20:31:33 +01:00
|
|
|
XSPICEDLLIBS="-ldl";;
|
2008-01-07 21:21:31 +01:00
|
|
|
esac
|
|
|
|
|
XSPICEINIT=""
|
|
|
|
|
AC_CHECK_FUNCS([modf])
|
|
|
|
|
AC_CHECK_HEADERS([libintl.h malloc.h])
|
2003-07-23 21:36:39 +02:00
|
|
|
else
|
2004-08-15 10:51:13 +02:00
|
|
|
XSPICEINIT="*"
|
2010-10-06 22:06:05 +02:00
|
|
|
|
2010-08-14 10:34:49 +02:00
|
|
|
if test -z "${YACC}" ; then
|
|
|
|
|
AC_MSG_WARN([No bison, byacc, yacc found: Uses prebuilt default parsers])
|
2010-10-06 22:06:05 +02:00
|
|
|
fi
|
2003-07-23 21:36:39 +02:00
|
|
|
fi
|
2004-08-15 10:51:13 +02:00
|
|
|
AC_SUBST(XSPICEINIT)
|
2010-11-16 20:31:33 +01:00
|
|
|
AC_SUBST(XSPICEDLLIBS)
|
2003-07-23 21:36:39 +02:00
|
|
|
|
2010-11-16 20:31:33 +01:00
|
|
|
AM_CONDITIONAL([XSPICE_WANTED], [test "$enable_xspice" = "yes"])
|
|
|
|
|
|
|
|
|
|
|
2005-03-17 22:22:33 +01:00
|
|
|
dnl Add CIDER enhancements to ngspice.
|
2003-08-11 22:59:48 +02:00
|
|
|
if test "$enable_cider" = "yes"; then
|
2003-08-12 13:41:56 +02:00
|
|
|
AC_MSG_RESULT(CIDER features enabled)
|
2007-11-25 20:59:17 +01:00
|
|
|
AC_DEFINE(CIDER,[1],[The CIDER enhancements])
|
2010-11-16 20:31:33 +01:00
|
|
|
fi
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2010-11-16 20:31:33 +01:00
|
|
|
AM_CONDITIONAL([CIDER_WANTED], [test "$enable_cider" = "yes"])
|
|
|
|
|
AM_CONDITIONAL([NUMDEV_WANTED], [test "$enable_cider" = "yes"])
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2003-08-11 22:59:48 +02:00
|
|
|
|
2012-01-02 13:31:22 +01:00
|
|
|
AM_CONDITIONAL([PSS_WANTED], [test "$enable_pss" = "yes"])
|
2006-02-16 12:44:42 +01:00
|
|
|
|
|
|
|
|
dnl adms option
|
2011-12-15 21:44:45 +01:00
|
|
|
if test "$enable_adms" = "yes" -o "$enable_adms3" = "yes" ; then
|
2006-02-16 12:44:42 +01:00
|
|
|
AC_MSG_RESULT(**********************************
|
|
|
|
|
* ADMS support is experimental *
|
|
|
|
|
**********************************)
|
|
|
|
|
AC_CHECK_PROGS(ADMSXML, admsXml admsXml.exe,no)
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2006-02-16 12:44:42 +01:00
|
|
|
if test "$ADMSXML" = "no"; then
|
2010-10-06 22:06:05 +02:00
|
|
|
AC_MSG_ERROR(If you want Verilog-A models you should install admsXml)
|
2008-01-07 21:21:31 +01:00
|
|
|
fi
|
2011-12-15 21:44:45 +01:00
|
|
|
if test "$enable_adms3" = "yes" ; then
|
|
|
|
|
AC_DEFINE(ADMS,[3],[Support for Verilog-A models (adms3)])
|
|
|
|
|
else
|
|
|
|
|
AC_DEFINE(ADMS,[1],[Support for Verilog-A models])
|
|
|
|
|
fi
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2009-01-01 21:44:49 +01:00
|
|
|
VLADEVDIR=" adms/ekv \
|
|
|
|
|
adms/hicum0 \
|
2006-02-23 09:33:06 +01:00
|
|
|
adms/hicum2 \
|
2007-05-13 11:55:13 +02:00
|
|
|
adms/mextram \
|
|
|
|
|
adms/psp102 "
|
2010-10-06 22:06:05 +02:00
|
|
|
|
|
|
|
|
dnl The makefiles for adms (to be added to AC_CONFIG_FILES by ./autogen.sh --adms)
|
2010-08-15 22:17:05 +02:00
|
|
|
#VLAMKF src/spicelib/devices/adms/ekv/Makefile
|
|
|
|
|
#VLAMKF src/spicelib/devices/adms/hicum0/Makefile
|
|
|
|
|
#VLAMKF src/spicelib/devices/adms/hicum2/Makefile
|
|
|
|
|
#VLAMKF src/spicelib/devices/adms/mextram/Makefile
|
|
|
|
|
#VLAMKF src/spicelib/devices/adms/psp102/Makefile
|
2008-12-28 18:29:30 +01:00
|
|
|
|
2008-11-26 10:40:16 +01:00
|
|
|
NOTVLADEVDIR=""
|
2006-02-23 09:33:06 +01:00
|
|
|
|
2009-01-01 21:44:49 +01:00
|
|
|
VLADEV=" spicelib/devices/adms/ekv/libekv.la \
|
|
|
|
|
spicelib/devices/adms/hicum0/libhicum0.la \
|
2008-08-27 15:39:05 +02:00
|
|
|
spicelib/devices/adms/hicum2/libhicum2.la \
|
2011-08-24 21:27:51 +02:00
|
|
|
spicelib/devices/adms/mextram/libbjt504t.la \
|
2008-08-27 15:39:05 +02:00
|
|
|
spicelib/devices/adms/psp102/libpsp102.la "
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2008-11-26 10:40:16 +01:00
|
|
|
else
|
|
|
|
|
|
|
|
|
|
VLADEVDIR=""
|
|
|
|
|
NOTVLADEVDIR="adms"
|
2008-12-28 18:29:30 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
fi
|
2008-12-28 18:29:30 +01:00
|
|
|
|
2006-02-17 15:52:57 +01:00
|
|
|
AC_SUBST(ADMSXML)
|
|
|
|
|
AC_SUBST(VLADEVDIR)
|
|
|
|
|
AC_SUBST(VLADEV)
|
2008-11-26 10:40:16 +01:00
|
|
|
AC_SUBST(NOTVLADEVDIR)
|
2006-02-17 15:52:57 +01:00
|
|
|
|
2007-05-01 05:41:59 +02:00
|
|
|
dnl NDEV option
|
|
|
|
|
if test "$enable_ndev" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(NDEV features enabled)
|
|
|
|
|
AC_DEFINE(NDEV,[],[The NDEV interface])
|
2007-05-01 05:41:59 +02:00
|
|
|
fi
|
2010-11-16 20:31:33 +01:00
|
|
|
AM_CONDITIONAL([NDEV_WANTED], [test "$enable_ndev" = "yes"])
|
2006-02-16 12:44:42 +01:00
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
|
2003-07-23 21:36:39 +02:00
|
|
|
dnl Cluster option
|
|
|
|
|
if test "$enable_cluster" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_MSG_RESULT(Cluster version is being compiled)
|
|
|
|
|
AC_DEFINE(CLUSTER,[],[Spice cluster support ])
|
|
|
|
|
LIBS="$LIBS -lpthread"
|
2003-07-23 21:36:39 +02:00
|
|
|
fi
|
2001-05-13 15:24:12 +02:00
|
|
|
|
2003-08-12 22:05:16 +02:00
|
|
|
if test "$enable_expdevices" = "yes"; then
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_DEFINE(EXP_DEV,[],[Define if we want to enable experimental devices])
|
|
|
|
|
AC_MSG_RESULT(WARNING: Experimental devices enabled)
|
2003-08-12 22:05:16 +02:00
|
|
|
fi
|
2003-08-12 13:41:56 +02:00
|
|
|
|
2004-01-10 22:39:36 +01:00
|
|
|
dnl ---- Option to include GNU readline support in ngspice CLI ----
|
2004-01-25 10:00:31 +01:00
|
|
|
dnl ---- Default: disabled. ----
|
|
|
|
|
dnl ---- Hope to see in the future readline replacement. ----
|
|
|
|
|
|
2004-01-28 01:07:29 +01:00
|
|
|
if test "$with_readline" != "yes"; then
|
2004-01-10 22:39:36 +01:00
|
|
|
AC_MSG_RESULT(GNU readline disabled.)
|
2008-01-07 21:21:31 +01:00
|
|
|
else
|
2009-05-06 23:30:26 +02:00
|
|
|
if test "x$with_tcl" = "x" -o "$with_tcl" = "no" ; then
|
2004-01-10 22:39:36 +01:00
|
|
|
AC_MSG_RESULT(Checking for readline:)
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_HEADERS([readline/readline.h readline/history.h],
|
2005-05-17 20:31:56 +02:00
|
|
|
[AC_DEFINE(HAVE_GNUREADLINE,[],[Define if we have GNU readline])],
|
2005-05-21 19:05:48 +02:00
|
|
|
[AC_MSG_ERROR(Couldn't find GNU readline headers.)])
|
|
|
|
|
AC_SEARCH_LIBS(tputs,ncurses termcap,
|
|
|
|
|
AC_DEFINE(HAVE_TERMCAP,[],[Define if we have ncurses or termcap]),
|
|
|
|
|
AC_MSG_ERROR(Found neither ncurses or termcap))
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_LIB(readline, readline,
|
2004-01-10 22:39:36 +01:00
|
|
|
[LIBS="$LIBS -lreadline"],
|
2008-01-07 21:21:31 +01:00
|
|
|
[AC_MSG_ERROR(Couldn't find readline libraries.)])
|
2008-08-27 15:39:05 +02:00
|
|
|
fi
|
2004-01-10 22:39:36 +01:00
|
|
|
fi
|
2000-04-27 22:03:57 +02:00
|
|
|
|
2004-01-25 10:00:31 +01:00
|
|
|
|
2005-05-06 09:19:36 +02:00
|
|
|
dnl ---- Option to include BSD editline support in ngspice CLI ----
|
|
|
|
|
dnl ---- Default: disabled. ----
|
|
|
|
|
|
|
|
|
|
if test "$with_editline" != "yes"; then
|
|
|
|
|
AC_MSG_RESULT(BSD editline disabled.)
|
2008-01-07 21:21:31 +01:00
|
|
|
else
|
2005-05-06 09:19:36 +02:00
|
|
|
AC_MSG_RESULT(Checking for editline:)
|
2010-10-06 22:06:05 +02:00
|
|
|
AC_CHECK_HEADERS([editline/readline.h],
|
2005-05-06 09:19:36 +02:00
|
|
|
[AC_DEFINE([HAVE_BSDEDITLINE],[1],[Define to enable BSD editline])],
|
2005-05-21 19:05:48 +02:00
|
|
|
[AC_MSG_ERROR(Couldn't find BSD editline headers.)])
|
|
|
|
|
AC_SEARCH_LIBS(tputs,ncurses termcap,
|
|
|
|
|
AC_DEFINE(HAVE_TERMCAP,[],[Define if we have ncurses or termcap]),
|
|
|
|
|
AC_MSG_ERROR(Found neither ncurses or termcap))
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CHECK_LIB(edit, readline,
|
2005-05-21 19:05:48 +02:00
|
|
|
[LIBS="$LIBS -ledit"],
|
2005-05-06 09:19:36 +02:00
|
|
|
[AC_MSG_ERROR(Couldn't find editline libraries.)],
|
2008-01-07 21:21:31 +01:00
|
|
|
-lncurses )
|
2005-05-06 09:19:36 +02:00
|
|
|
fi
|
|
|
|
|
|
2007-12-13 22:29:51 +01:00
|
|
|
dnl Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined
|
|
|
|
|
AC_CHECK_HEADERS(ncurses/termcap.h termcap.h)
|
|
|
|
|
|
2012-05-28 17:51:28 +02:00
|
|
|
dnl --enable-openmp: Use OpenMP on multi-core processors
|
|
|
|
|
AC_ARG_ENABLE(openmp,
|
|
|
|
|
AS_HELP_STRING([--enable-openmp],[Use OpenMP parallel processing]))
|
|
|
|
|
|
2010-06-24 12:25:05 +02:00
|
|
|
dnl Add OpenMP to ngspice.
|
2012-05-28 17:51:28 +02:00
|
|
|
: ${enable_openmp:=no}
|
|
|
|
|
AC_OPENMP
|
|
|
|
|
|
2010-06-24 12:25:05 +02:00
|
|
|
if test "$enable_openmp" = "yes"; then
|
2012-05-28 17:51:28 +02:00
|
|
|
AC_DEFINE([USE_OMP], [1], [OpenMP parallel processing])
|
|
|
|
|
CFLAGS="$CFLAGS $OPENMP_CFLAGS"
|
|
|
|
|
AC_MSG_RESULT(OpenMP feature enabled)
|
2010-06-24 12:25:05 +02:00
|
|
|
fi
|
2004-01-25 10:00:31 +01:00
|
|
|
|
2005-05-17 20:31:56 +02:00
|
|
|
dnl Output Files
|
|
|
|
|
dnl ------------
|
|
|
|
|
|
2008-01-07 21:21:31 +01:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
|
man/Makefile
|
2010-10-06 22:06:05 +02:00
|
|
|
man/man1/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/Makefile
|
|
|
|
|
src/spicelib/Makefile
|
|
|
|
|
src/spicelib/analysis/Makefile
|
|
|
|
|
src/spicelib/devices/Makefile
|
|
|
|
|
src/spicelib/devices/asrc/Makefile
|
|
|
|
|
src/spicelib/devices/bjt/Makefile
|
|
|
|
|
src/spicelib/devices/bsim1/Makefile
|
|
|
|
|
src/spicelib/devices/bsim2/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3v0/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3v1/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3v32/Makefile
|
|
|
|
|
src/spicelib/devices/bsim4/Makefile
|
|
|
|
|
src/spicelib/devices/bsim4v4/Makefile
|
|
|
|
|
src/spicelib/devices/bsim4v5/Makefile
|
2011-06-19 16:03:07 +02:00
|
|
|
src/spicelib/devices/bsim4v6/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/spicelib/devices/bsim3soi/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3soi_pd/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3soi_fd/Makefile
|
|
|
|
|
src/spicelib/devices/bsim3soi_dd/Makefile
|
|
|
|
|
src/spicelib/devices/cap/Makefile
|
|
|
|
|
src/spicelib/devices/cccs/Makefile
|
|
|
|
|
src/spicelib/devices/ccvs/Makefile
|
|
|
|
|
src/spicelib/devices/csw/Makefile
|
|
|
|
|
src/spicelib/devices/cpl/Makefile
|
|
|
|
|
src/spicelib/devices/dio/Makefile
|
|
|
|
|
src/spicelib/devices/ind/Makefile
|
|
|
|
|
src/spicelib/devices/isrc/Makefile
|
|
|
|
|
src/spicelib/devices/hfet1/Makefile
|
|
|
|
|
src/spicelib/devices/hfet2/Makefile
|
2011-05-22 12:29:24 +02:00
|
|
|
src/spicelib/devices/hisim2/Makefile
|
2011-04-29 18:47:55 +02:00
|
|
|
src/spicelib/devices/hisimhv/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/spicelib/devices/jfet/Makefile
|
|
|
|
|
src/spicelib/devices/jfet2/Makefile
|
|
|
|
|
src/spicelib/devices/ltra/Makefile
|
|
|
|
|
src/spicelib/devices/mes/Makefile
|
|
|
|
|
src/spicelib/devices/mesa/Makefile
|
|
|
|
|
src/spicelib/devices/mos1/Makefile
|
|
|
|
|
src/spicelib/devices/mos2/Makefile
|
|
|
|
|
src/spicelib/devices/mos3/Makefile
|
|
|
|
|
src/spicelib/devices/mos6/Makefile
|
|
|
|
|
src/spicelib/devices/mos9/Makefile
|
|
|
|
|
src/spicelib/devices/ndev/Makefile
|
|
|
|
|
src/spicelib/devices/res/Makefile
|
|
|
|
|
src/spicelib/devices/soi3/Makefile
|
|
|
|
|
src/spicelib/devices/sw/Makefile
|
|
|
|
|
src/spicelib/devices/tra/Makefile
|
|
|
|
|
src/spicelib/devices/txl/Makefile
|
|
|
|
|
src/spicelib/devices/urc/Makefile
|
|
|
|
|
src/spicelib/devices/vbic/Makefile
|
|
|
|
|
src/spicelib/devices/vccs/Makefile
|
|
|
|
|
src/spicelib/devices/vcvs/Makefile
|
|
|
|
|
src/spicelib/devices/vsrc/Makefile
|
|
|
|
|
src/spicelib/devices/nbjt/Makefile
|
|
|
|
|
src/spicelib/devices/nbjt2/Makefile
|
|
|
|
|
src/spicelib/devices/numd/Makefile
|
|
|
|
|
src/spicelib/devices/numd2/Makefile
|
|
|
|
|
src/spicelib/devices/numos/Makefile
|
|
|
|
|
src/spicelib/parser/Makefile
|
|
|
|
|
src/ciderlib/Makefile
|
|
|
|
|
src/ciderlib/input/Makefile
|
|
|
|
|
src/ciderlib/support/Makefile
|
|
|
|
|
src/ciderlib/oned/Makefile
|
|
|
|
|
src/ciderlib/twod/Makefile
|
|
|
|
|
src/frontend/Makefile
|
|
|
|
|
src/frontend/numparam/Makefile
|
|
|
|
|
src/frontend/help/Makefile
|
|
|
|
|
src/frontend/parser/Makefile
|
|
|
|
|
src/frontend/plotting/Makefile
|
2011-02-19 17:47:30 +01:00
|
|
|
src/frontend/trannoise/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/frontend/wdisp/Makefile
|
2011-08-20 19:45:23 +02:00
|
|
|
src/include/ngspice/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/maths/Makefile
|
|
|
|
|
src/maths/cmaths/Makefile
|
2011-02-19 17:47:30 +01:00
|
|
|
src/maths/fft/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/maths/misc/Makefile
|
|
|
|
|
src/maths/ni/Makefile
|
|
|
|
|
src/maths/deriv/Makefile
|
|
|
|
|
src/maths/poly/Makefile
|
|
|
|
|
src/maths/sparse/Makefile
|
|
|
|
|
src/misc/Makefile
|
|
|
|
|
src/xspice/Makefile
|
|
|
|
|
src/xspice/cm/Makefile
|
|
|
|
|
src/xspice/cmpp/Makefile
|
|
|
|
|
src/xspice/icm/makedefs
|
2011-01-25 19:34:11 +01:00
|
|
|
src/xspice/icm/GNUmakefile
|
2008-01-07 21:21:31 +01:00
|
|
|
src/xspice/mif/Makefile
|
|
|
|
|
src/xspice/evt/Makefile
|
|
|
|
|
src/xspice/enh/Makefile
|
|
|
|
|
src/xspice/ipc/Makefile
|
|
|
|
|
src/xspice/idn/Makefile
|
|
|
|
|
tests/Makefile
|
|
|
|
|
tests/bsim1/Makefile
|
|
|
|
|
tests/bsim2/Makefile
|
|
|
|
|
tests/bsim3/Makefile
|
2009-03-01 10:58:02 +01:00
|
|
|
tests/bsim3/ac_sim/Makefile
|
|
|
|
|
tests/bsim3/dc_sim/Makefile
|
|
|
|
|
tests/bsim3/tran_sim/Makefile
|
2008-04-20 11:36:53 +02:00
|
|
|
tests/bsim3soi/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
tests/bsim3soidd/Makefile
|
|
|
|
|
tests/bsim3soifd/Makefile
|
|
|
|
|
tests/bsim3soipd/Makefile
|
|
|
|
|
tests/bsim4/Makefile
|
|
|
|
|
tests/filters/Makefile
|
|
|
|
|
tests/general/Makefile
|
|
|
|
|
tests/hfet/Makefile
|
2011-05-30 20:47:05 +02:00
|
|
|
tests/hisim/Makefile
|
|
|
|
|
tests/hisimhv/Makefile
|
2008-01-07 21:21:31 +01:00
|
|
|
tests/jfet/Makefile
|
|
|
|
|
tests/mes/Makefile
|
|
|
|
|
tests/mesa/Makefile
|
|
|
|
|
tests/mos6/Makefile
|
|
|
|
|
tests/polezero/Makefile
|
|
|
|
|
tests/sensitivity/Makefile
|
|
|
|
|
tests/transient/Makefile
|
|
|
|
|
tests/transmission/Makefile
|
2010-11-21 16:40:11 +01:00
|
|
|
tests/xspice/Makefile
|
|
|
|
|
tests/xspice/digital/Makefile
|
|
|
|
|
tests/xspice/digital/spinit
|
2008-01-07 21:21:31 +01:00
|
|
|
tests/resistance/Makefile
|
|
|
|
|
tests/vbic/Makefile])
|
2004-07-09 20:37:25 +02:00
|
|
|
AC_OUTPUT
|