iverilog/configure.in

113 lines
2.2 KiB
Plaintext
Raw Normal View History

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
AC_CHECK_TOOL(STRIP, strip, true)
1999-11-29 18:02:21 +01:00
AC_CHECK_HEADERS(getopt.h)
2000-12-09 02:17:38 +01:00
AC_CHECK_HEADER(ipal.h, HAVE_IPAL=yes, HAVE_IPAL=)
1999-04-25 23:54:33 +02:00
AC_PROG_INSTALL
AC_CHECK_LIB(dl,main,[DLLIB=-ldl])
AC_SUBST(DLLIB)
AC_CANONICAL_HOST
2000-09-30 05:20:47 +02:00
# $host
2000-12-09 02:17:38 +01:00
AC_SUBST(HAVE_IPAL)
#######################
## test for underscores. The vpi module loader in vvm needs to know this
## in order to know the name of the start symbol for the .vpi module.
#######################
2000-09-30 05:20:47 +02:00
AC_CYGWIN
AC_EXEEXT
AC_SUBST(EXEEXT)
AC_MSG_CHECKING("for leading and/or trailing underscores")
cat << EOF > underscore.c
void underscore(void){}
EOF
2000-09-30 05:20:47 +02:00
$CC -shared -c underscore.c > /dev/null 2>&1
CC_LEADING_UNDERSCORE=no
CC_TRAILING_UNDERSCORE=no
output=`nm underscore.o|grep _underscore 2>&1`
2000-09-30 05:20:47 +02:00
if test ! -z "$output" -a -z "$CYGWIN" ; then
CC_LEADING_UNDERSCORE=yes
AC_DEFINE(NEED_LU)
fi
2000-09-30 05:20:47 +02:00
PICFLAG=-fPIC
if test ! -z "$CYGWIN" ; then
PICFLAG=
fi
AC_SUBST(CYGWIN)
AC_SUBST(PICFLAG)
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
# The -rdynamic flag is used by iverilog when compiling the target,
# to know how to export symbols of the main program to loadable modules
# that are brought in by -ldl
AC_MSG_CHECKING("for -rdynamic compiler flag")
rdynamic=-rdynamic
case "${host}" in
*-*-netbsd*)
rdynamic="-Wl,--export-dynamic"
;;
*-*-solaris*)
rdynamic=""
;;
2000-09-30 05:20:47 +02:00
*-*-cygwin*)
rdynamic=""
;;
esac
2000-08-12 18:34:37 +02:00
AC_SUBST(rdynamic)
2000-08-12 18:34:37 +02:00
AC_MSG_RESULT($rdynamic)
2000-12-15 00:38:04 +01:00
AC_MSG_CHECKING("for shared library build flag")
shared=-shared
case "${host}" in
*-*-cygwin*)
shared="-mdll -Wl,--enable-auto-image-base"
;;
esac
AC_SUBST(shared)
AC_MSG_RESULT($shared)
2000-12-09 02:17:38 +01:00
AC_OUTPUT(Makefile vpi/Makefile ivlpp/Makefile vvm/Makefile driver/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-verilog/Makefile tgt-pal/Makefile)