ngspice/configure.in

317 lines
9.0 KiB
Plaintext
Raw Normal View History

2000-04-27 22:03:57 +02:00
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main.c)
2000-04-27 22:03:57 +02:00
dnl Create a configuration header
AM_CONFIG_HEADER(config.h)
dnl Initialize automake stuff
AM_INIT_AUTOMAKE(ng-spice-rework,14pre4)
dnl --enable-ftedebug : enable frontend debug macros
AC_ARG_ENABLE(ftedebug,
[ --enable-ftedebug Enable ngspice frontend debug])
2000-04-27 22:03:57 +02:00
dnl --enable-ansi : try to force --ansi option to the compiler
AC_ARG_ENABLE(ansi,
[ --enable-ansi Force --ansi option for compilation])
dnl --disable-debug : remove -g and -Wall option to the compiler
AC_ARG_ENABLE(debug,
[ --enable-debug Add -g option for compilation (default)])
dnl --enable-checker : add --with-checker-debug option to the compiler
AC_ARG_ENABLE(checker,
[ --enable-checkergcc Option for compilation with checkergcc])
dnl --enable-bypass : define BYPASS for the code
AC_ARG_ENABLE(nobypass,
[ --enable-nobypass Don't bypass recalculations of slowly changing variables])
dnl --enable-predictor : define PREDICTOR for the code
AC_ARG_ENABLE(predictor,
[ --enable-predictor Enables a predictor method for convergence])
dnl --enable-sense2 : define HAVE_SENSE2 for the code
AC_ARG_ENABLE(sense2,
[ --enable-sense2 Use spice2 sensitivity analysis])
2001-01-24 18:15:31 +01:00
dnl --enable-intnoise : define INT_NOISE for the code
AC_ARG_ENABLE(intnoise,
[ --enable-intnoise Enables noise integration in noise analysis])
* TODO, doc/ngspice.texi: Small updates * configure.in: New --enable-smoketest. * src/main.c src/ngspice.c src/frontend/outitf.c src/frontend/runcoms.c src/frontend/spiceif.c src/frontend/parser/numparse.c src/include/cktdefs.h src/include/fteext.h src/include/inpdefs.h src/include/jobdefs.h src/include/ngspice.h src/include/tskdefs.h src/spicelib/analysis/Makefile.am src/spicelib/analysis/acsetp.c src/spicelib/analysis/cktaskaq.c src/spicelib/analysis/cktdojob.c src/spicelib/analysis/cktnewan.c src/spicelib/analysis/cktsetap.c src/spicelib/analysis/cktsopt.c src/spicelib/analysis/ckttroub.c src/spicelib/analysis/dcosetp.c src/spicelib/analysis/dctsetp.c src/spicelib/analysis/dsetparm.c src/spicelib/analysis/nsetparm.c src/spicelib/analysis/pzsetp.c src/spicelib/analysis/senssetp.c src/spicelib/analysis/tfsetp.c src/spicelib/analysis/transetp.c src/spicelib/devices/bjt/bjtdset.h src/spicelib/devices/bjt/bjtext.h src/spicelib/devices/bjt/bjtsetup.c src/spicelib/devices/bsim2/b2set.c src/spicelib/devices/bsim3/b3acld.c src/spicelib/devices/bsim3/b3set.c src/spicelib/devices/bsim3/bsim3def.h src/spicelib/devices/csw/cswtrunc.c src/spicelib/devices/dio/diodset.c src/spicelib/devices/dio/dioinit.c src/spicelib/devices/jfet/jfetset.c src/spicelib/devices/mes/messetup.c src/spicelib/devices/mos1/mos1ask.c src/spicelib/devices/mos1/mos1set.c src/spicelib/devices/mos1/mos1temp.c src/spicelib/devices/mos3/mos3load.c src/spicelib/devices/mos6/mos6set.c src/spicelib/devices/sw/swtrunc.c src/spicelib/parser/inppas2.c src/spicelib/parser/inppas3.c src/spicelib/parser/inppas3.h: Paolo and I have integrated patches from Alan Gillespie <Alan.Gillespie@analog.com>.
2000-09-05 21:48:22 +02:00
dnl --enable-smoketest : a smoketest
AC_ARG_ENABLE(smoketest,
[ --enable-smoketest Enables smoketest compile])
2000-04-27 22:03:57 +02:00
dnl --enable-experimental : define EXPERIMENTAL_CODE for the code
AC_ARG_ENABLE(experimental,
[ --enable-experimental Enables some experimental code])
dnl --enable-ekv: define HAVE_EKV in the code. This is for EKV model support
AC_ARG_ENABLE(ekv,
[ --enable-ekv Enables ekv model *not in standard distribution*])
2000-04-27 22:03:57 +02:00
dnl Enable maintainer commands only if requested
AM_MAINTAINER_MODE
dnl Work on compiler options according to system:
dnl Set default CFLAG - only use -Wall if we have gcc
AC_PROG_CC
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall "
fi
if test "$enable_debug" = "no"; then
AC_MSG_WARN(Removing debugging option!)
CFLAGS=" "
fi
* TODO, doc/ngspice.texi: Small updates * configure.in: New --enable-smoketest. * src/main.c src/ngspice.c src/frontend/outitf.c src/frontend/runcoms.c src/frontend/spiceif.c src/frontend/parser/numparse.c src/include/cktdefs.h src/include/fteext.h src/include/inpdefs.h src/include/jobdefs.h src/include/ngspice.h src/include/tskdefs.h src/spicelib/analysis/Makefile.am src/spicelib/analysis/acsetp.c src/spicelib/analysis/cktaskaq.c src/spicelib/analysis/cktdojob.c src/spicelib/analysis/cktnewan.c src/spicelib/analysis/cktsetap.c src/spicelib/analysis/cktsopt.c src/spicelib/analysis/ckttroub.c src/spicelib/analysis/dcosetp.c src/spicelib/analysis/dctsetp.c src/spicelib/analysis/dsetparm.c src/spicelib/analysis/nsetparm.c src/spicelib/analysis/pzsetp.c src/spicelib/analysis/senssetp.c src/spicelib/analysis/tfsetp.c src/spicelib/analysis/transetp.c src/spicelib/devices/bjt/bjtdset.h src/spicelib/devices/bjt/bjtext.h src/spicelib/devices/bjt/bjtsetup.c src/spicelib/devices/bsim2/b2set.c src/spicelib/devices/bsim3/b3acld.c src/spicelib/devices/bsim3/b3set.c src/spicelib/devices/bsim3/bsim3def.h src/spicelib/devices/csw/cswtrunc.c src/spicelib/devices/dio/diodset.c src/spicelib/devices/dio/dioinit.c src/spicelib/devices/jfet/jfetset.c src/spicelib/devices/mes/messetup.c src/spicelib/devices/mos1/mos1ask.c src/spicelib/devices/mos1/mos1set.c src/spicelib/devices/mos1/mos1temp.c src/spicelib/devices/mos3/mos3load.c src/spicelib/devices/mos6/mos6set.c src/spicelib/devices/sw/swtrunc.c src/spicelib/parser/inppas2.c src/spicelib/parser/inppas3.c src/spicelib/parser/inppas3.h: Paolo and I have integrated patches from Alan Gillespie <Alan.Gillespie@analog.com>.
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"
fi
dnl Checks for ANSI-C header files.
AC_HEADER_STDC
if test "$enable_ansi" = "yes"; then
AM_PROG_CC_STDC
if test ! "$am_cv_prog_cc_stdc"="yes"; then
AC_MSG_WARN(Failed to find Ansi flag!)
fi
fi
* TODO, doc/ngspice.texi: Small updates * configure.in: New --enable-smoketest. * src/main.c src/ngspice.c src/frontend/outitf.c src/frontend/runcoms.c src/frontend/spiceif.c src/frontend/parser/numparse.c src/include/cktdefs.h src/include/fteext.h src/include/inpdefs.h src/include/jobdefs.h src/include/ngspice.h src/include/tskdefs.h src/spicelib/analysis/Makefile.am src/spicelib/analysis/acsetp.c src/spicelib/analysis/cktaskaq.c src/spicelib/analysis/cktdojob.c src/spicelib/analysis/cktnewan.c src/spicelib/analysis/cktsetap.c src/spicelib/analysis/cktsopt.c src/spicelib/analysis/ckttroub.c src/spicelib/analysis/dcosetp.c src/spicelib/analysis/dctsetp.c src/spicelib/analysis/dsetparm.c src/spicelib/analysis/nsetparm.c src/spicelib/analysis/pzsetp.c src/spicelib/analysis/senssetp.c src/spicelib/analysis/tfsetp.c src/spicelib/analysis/transetp.c src/spicelib/devices/bjt/bjtdset.h src/spicelib/devices/bjt/bjtext.h src/spicelib/devices/bjt/bjtsetup.c src/spicelib/devices/bsim2/b2set.c src/spicelib/devices/bsim3/b3acld.c src/spicelib/devices/bsim3/b3set.c src/spicelib/devices/bsim3/bsim3def.h src/spicelib/devices/csw/cswtrunc.c src/spicelib/devices/dio/diodset.c src/spicelib/devices/dio/dioinit.c src/spicelib/devices/jfet/jfetset.c src/spicelib/devices/mes/messetup.c src/spicelib/devices/mos1/mos1ask.c src/spicelib/devices/mos1/mos1set.c src/spicelib/devices/mos1/mos1temp.c src/spicelib/devices/mos3/mos3load.c src/spicelib/devices/mos6/mos6set.c src/spicelib/devices/sw/swtrunc.c src/spicelib/parser/inppas2.c src/spicelib/parser/inppas3.c src/spicelib/parser/inppas3.h: Paolo and I have integrated patches from Alan Gillespie <Alan.Gillespie@analog.com>.
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
dnl Chech system we're on , and tune accordingly
AC_CANONICAL_HOST
dnl Checks for programs
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
dnl Checks for X11 header files and libraries - X11 support can be disabled
dnl by passing the '--without-x' option to configure:
AC_PATH_X
AC_PATH_XTRA
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)
if test ! "$no_x" = "yes" ; then
X_LIBS="$X_LIBS -lX11 -lXt"
AC_CHECK_LIB(Xext, XShmAttach,X_LIBS="$X_LIBS -lXext",AC_MSG_ERROR(Couldn't find Xext librairies), $X_LIBS $X_EXTRA_LIBS)
AC_CHECK_LIB(Xmu,main,X_LIBS="$X_LIBS -lXmu",AC_MSG_ERROR(Couldn't find Xmu librairies), $X_LIBS $X_EXTRA_LIBS)
2001-11-25 19:11:44 +01:00
AC_CHECK_LIB(Xaw,main,X_LIBS="$X_LIBS -lXaw",AC_MSG_ERROR(Couldn't find Xaw librairies),$X_LIBS $X_EXTRA_LIBS)
2000-04-27 22:03:57 +02:00
fi
dnl Check for a few typdefs:
AC_TYPE_PID_T
AC_TYPE_SIGNAL
dnl Check for a few libraries and headers:
dnl Look for ncurses first, then termcap
AC_SEARCH_LIBS(tputs,ncurses termcap,AC_DEFINE(HAVE_TERMCAP),
AC_MSG_ERROR(Found neither ncurses or termcap))
AC_HEADER_DIRENT
2001-02-11 01:47:21 +01:00
AC_CHECK_HEADERS(ctype.h unistd.h pwd.h fcntl.h string.h)
2000-04-27 22:03:57 +02:00
AC_HEADER_SYS_WAIT
AC_HEADER_STAT
dnl Check time and ressources headers and functions:
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_CHECK_FUNCS(localtime)
AC_CHECK_FUNCS(gettimeofday time ftime , break)
AC_CHECK_FUNCS(getrusage utimes, break)
AC_CHECK_FUNCS(getrlimit ulimit, break)
dnl Look for termios first (posix)
AC_CHECK_HEADERS(termios.h termio.h sgtty.h , break)
AC_CHECK_FUNCS(isatty)
dnl Check for a few functions:
AC_FUNC_VFORK
AC_CHECK_FUNCS(access bcopy qsort dup2 popen)
AC_CHECK_FUNCS(strchr index , break)
AC_CHECK_FUNCS(getcwd getwd , break)
AC_MSG_RESULT(Checking mathematical features of the system:)
dnl Look for math library:
AC_CHECK_LIB(m,sqrt)
AC_CHECK_HEADERS(float.h limits.h values.h)
dnl Check for a few mathematical functions:
AC_CHECK_FUNCS(erfc logb scalb scalbn asinh acosh atanh)
AC_MSG_RESULT(Checking for the presence of the Garbage Collector:)
dnl Check for the garbage collector:
AC_CHECK_LIB(gc,GC_malloc,AC_DEFINE(HAVE_LIBGC) LIBS="$LIBS -lgc")
dnl Check for the asprintf function:
AC_CHECK_FUNCS(asprintf)
2000-04-27 22:03:57 +02:00
# Expand the prefix variable (this is really annoying!)
if eval "test x$prefix = xNONE"; then
dprefix=$ac_default_prefix
else
dprefix=$prefix
fi
AC_DEFINE_UNQUOTED(NGSPICEBINDIR, "`echo $dprefix/bin`" )
AC_DEFINE_UNQUOTED(NGSPICEDATADIR, "`echo $dprefix/share/ng-spice-rework`" )
2000-04-27 22:03:57 +02:00
AC_DEFINE_UNQUOTED(NGSPICEBUILDDATE, "`date`" )
# Recapitulate settings:
AC_MSG_RESULT(Settings which were chosen:)
if test "$enable_sense2" = "yes"; then
AC_DEFINE(WANT_SENSE2)
AC_MSG_RESULT(Spice2 sensitivity analysis enabled)
fi
if test "$enable_nobypass" = "yes"; then
AC_DEFINE(NOBYPASS)
AC_MSG_RESULT(NOBYPASS option enabled)
fi
if test "$enable_predictor" = "yes"; then
AC_DEFINE(PREDICTOR)
AC_MSG_RESULT(PREDICTOR algorithm enabled)
fi
2001-01-24 18:15:31 +01:00
if test "$enable_intnoise" = "yes"; then
AC_DEFINE(INT_NOISE)
AC_MSG_RESULT(Noise integration enabled)
fi
2000-04-27 22:03:57 +02:00
if test "$enable_experimental" = "yes"; then
AC_DEFINE(EXPERIMENTAL_CODE)
AC_MSG_RESULT(EXPERIMENTAL_CODE enabled)
fi
if test "$enable_ftedebug" = "yes"; then
AC_DEFINE(FTEDEBUG)
AC_MSG_RESULT(WARNING: Frontend debug is enabled)
fi
if test "$enable_ekv" = "yes"; then
AC_MSG_RESULT(Model EKV included)
AC_DEFINE(HAVE_EKV)
EKVDIR="ekv"
EKVLIB="spicelib/devices/ekv/libekv.la"
else
EKVDIR=""
EKVLIB=""
fi
AC_SUBST(EKVDIR)
AC_SUBST(EKVLIB)
dnl --with-readline : the user wants to use readline library
AC_ARG_WITH(readline,
[ --with-readline Use the readline package: SEE README],
AC_MSG_RESULT(Checking for readline library:)
dnl Check for the readline library:
AC_CHECK_LIB(readline,readline, AC_DEFINE(HAVE_GNUREADLINE) LIBS="$LIBS -lreadline")
)
2000-04-27 22:03:57 +02:00
AC_OUTPUT( \
Makefile \
doc/Makefile \
man/Makefile \
man/man1/Makefile \
src/Makefile \
src/spicelib/Makefile \
src/spicelib/analysis/Makefile \
2000-07-23 11:17:22 +02:00
src/spicelib/devices/Makefile \
src/spicelib/devices/asrc/Makefile \
src/spicelib/devices/bjt/Makefile \
src/spicelib/devices/bjt2/Makefile \
2000-07-23 11:17:22 +02:00
src/spicelib/devices/bsim1/Makefile \
src/spicelib/devices/bsim2/Makefile \
src/spicelib/devices/bsim3v1/Makefile \
src/spicelib/devices/bsim3/Makefile \
src/spicelib/devices/bsim4/Makefile \
src/spicelib/devices/bsim3v2/Makefile \
src/spicelib/devices/bsim3soi_pd/Makefile \
src/spicelib/devices/bsim3soi_fd/Makefile \
src/spicelib/devices/bsim3soi_dd/Makefile \
2000-07-23 11:17:22 +02:00
src/spicelib/devices/cap/Makefile \
src/spicelib/devices/cccs/Makefile \
src/spicelib/devices/ccvs/Makefile \
src/spicelib/devices/csw/Makefile \
src/spicelib/devices/dio/Makefile \
src/spicelib/devices/ekv/Makefile \
2000-07-23 11:17:22 +02:00
src/spicelib/devices/ind/Makefile \
src/spicelib/devices/isrc/Makefile \
src/spicelib/devices/hfet1/Makefile \
src/spicelib/devices/hfet2/Makefile \
2000-07-23 11:17:22 +02: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 \
2000-07-23 11:17:22 +02:00
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 \
2000-07-23 11:17:22 +02:00
src/spicelib/devices/res/Makefile \
2001-05-02 22:33:10 +02:00
src/spicelib/devices/soi3/Makefile \
src/spicelib/devices/sw/Makefile \
2000-07-23 11:17:22 +02:00
src/spicelib/devices/tra/Makefile \
src/spicelib/devices/urc/Makefile \
src/spicelib/devices/vccs/Makefile \
src/spicelib/devices/vcvs/Makefile \
src/spicelib/devices/vsrc/Makefile \
src/spicelib/parser/Makefile \
2000-04-27 22:03:57 +02:00
src/frontend/Makefile \
src/frontend/help/Makefile \
src/frontend/parser/Makefile \
src/frontend/plotting/Makefile \
2000-04-27 22:03:57 +02:00
src/include/Makefile \
src/maths/Makefile \
src/maths/cmaths/Makefile \
src/maths/ni/Makefile \
2000-06-16 23:12:45 +02:00
src/maths/deriv/Makefile \
src/maths/poly/Makefile \
2000-04-27 22:03:57 +02:00
src/maths/sparse/Makefile \
src/misc/Makefile \
tests/Makefile \
tests/filters/Makefile \
tests/polezero/Makefile \
tests/resistance/Makefile \
tests/bsim3soipd/Makefile \
tests/bsim3soifd/Makefile \
2001-01-24 18:15:31 +01:00
tests/bsim3soidd/Makefile \
tests/bsim4/Makefile
2000-04-27 22:03:57 +02:00
)