1999-04-25 23:54:33 +02:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
AC_INIT(netlist.h)
|
|
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
1999-07-03 22:50:28 +02:00
|
|
|
AC_PROG_CC
|
1999-04-25 23:54:33 +02:00
|
|
|
AC_PROG_CXX
|
1999-10-23 18:55:51 +02:00
|
|
|
AC_CHECK_TOOL(STRIP, strip, true)
|
1999-11-29 18:02:21 +01:00
|
|
|
AC_CHECK_HEADERS(getopt.h)
|
1999-04-25 23:54:33 +02:00
|
|
|
AC_PROG_INSTALL
|
2000-01-24 01:18:20 +01:00
|
|
|
AC_CHECK_LIB(dl,main,[DLLIB=-ldl])
|
|
|
|
|
AC_SUBST(DLLIB)
|
|
|
|
|
|
|
|
|
|
#######################
|
|
|
|
|
## test for underscores
|
|
|
|
|
#######################
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING("for leading and/or trailing underscores")
|
|
|
|
|
cat << EOF > underscore.c
|
|
|
|
|
void underscore(void){}
|
|
|
|
|
EOF
|
|
|
|
|
$CC -c underscore.c > /dev/null 2>&1
|
|
|
|
|
|
|
|
|
|
CC_LEADING_UNDERSCORE=no
|
|
|
|
|
CC_TRAILING_UNDERSCORE=no
|
|
|
|
|
|
|
|
|
|
output=`nm underscore.o|grep _underscore 2>&1`
|
|
|
|
|
if test ! -z "$output"; then
|
|
|
|
|
CC_LEADING_UNDERSCORE=yes
|
|
|
|
|
AC_DEFINE(NEED_LU)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
output=`nm underscore.o|grep underscore_ 2>&1`
|
|
|
|
|
if test ! -z "$output"; then
|
|
|
|
|
CC_TRAILING_UNDERSCORE=yes
|
|
|
|
|
AC_DEFINE(NEED_TU)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test "$CC_LEADING_UNDERSCORE" = yes; then
|
|
|
|
|
AC_DEFINE(WLU)
|
|
|
|
|
fi
|
|
|
|
|
if test "$CC_TRAILING_UNDERSCORE" = yes; then
|
|
|
|
|
AC_DEFINE(WTU)
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
rm underscore.c underscore.o
|
|
|
|
|
|
|
|
|
|
AC_MSG_RESULT("$CC_LEADING_UNDERSCORE $CC_TRAILING_UNDERSCORE")
|
|
|
|
|
|
|
|
|
|
#######################
|
|
|
|
|
## end of test for underscores
|
|
|
|
|
#######################
|
1999-04-25 23:54:33 +02:00
|
|
|
|
1999-08-15 03:23:56 +02:00
|
|
|
AC_OUTPUT(Makefile vpi/Makefile ivlpp/Makefile vvm/Makefile)
|