2004-06-03 03:38:44 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
AC_INIT(libasn1parser/asn1p_y.y)
|
2004-08-23 10:30:53 +00:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_TARGET
|
2004-06-03 03:38:44 +00:00
|
|
|
AC_PREREQ(2.53)
|
2004-09-19 19:40:52 +00:00
|
|
|
AM_INIT_AUTOMAKE(asn1c, 0.9.6)
|
2004-06-03 03:38:44 +00:00
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
|
|
|
|
dnl *** Autoconf support ***
|
|
|
|
AC_ARG_ENABLE(autoconf,
|
|
|
|
[ --disable-autoconf disable automatic generation of configure script ],
|
|
|
|
enable_autoconf=$enableval, enable_autoconf=yes
|
|
|
|
)
|
|
|
|
AC_PATH_PROG(AUTOCONF, autoconf, @echo autoconf not available)
|
|
|
|
AC_PATH_PROG(AUTOHEADER, autoheader, @echo autoheader not available)
|
|
|
|
if test -z "$AUTOCONF"; then enable_autoconf=no ; fi
|
|
|
|
if test -z "$AUTOHEADER"; then enable_autoconf=no ; fi
|
|
|
|
if test x$enable_autoconf = xyes; then
|
|
|
|
CONFIGURE_DEPENDS="configure.in aclocal.m4"
|
|
|
|
fi
|
|
|
|
AC_SUBST(CONFIGURE_DEPENDS)
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
2004-08-11 05:35:51 +00:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CXXCPP
|
|
|
|
AM_CONDITIONAL(CPLUSPLUS_FOUND, test -n "$ac_ct_CXX")
|
2004-06-03 03:38:44 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_YACC
|
|
|
|
AM_PROG_LEX
|
|
|
|
|
|
|
|
dnl *** Building mingw32 with cygwin compiler ***
|
2004-08-23 10:40:21 +00:00
|
|
|
case "$host_os" in
|
|
|
|
cygwin*)
|
2004-08-25 01:34:11 +00:00
|
|
|
dnl CFLAGS="$CFLAGS -DWIN32"
|
2004-08-23 10:40:21 +00:00
|
|
|
case "$target" in
|
|
|
|
*mingw*)
|
|
|
|
CC="$CC -mno-cygwin"
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
mingw* | p32*)
|
2004-08-25 01:34:11 +00:00
|
|
|
dnl CFLAGS="$CFLAGS -DWIN32"
|
2004-08-23 10:40:21 +00:00
|
|
|
;;
|
2004-06-03 03:38:44 +00:00
|
|
|
esac
|
|
|
|
|
2004-09-26 14:18:32 +00:00
|
|
|
AC_ARG_ENABLE(Werror,
|
2004-06-03 03:38:44 +00:00
|
|
|
[ --enable-Werror abort compilation after any C compiler warning],
|
2004-09-26 14:10:37 +00:00
|
|
|
enable_werror=$enableval, enable_werror=no)
|
|
|
|
if test x$enable_werror = xyes; then
|
2004-09-26 14:18:32 +00:00
|
|
|
ADD_CFLAGS="-Werror -W -Wpointer-arith"
|
2004-09-26 14:10:37 +00:00
|
|
|
fi
|
2004-06-03 03:38:44 +00:00
|
|
|
AC_SUBST(ADD_CFLAGS)
|
|
|
|
|
|
|
|
dnl Add these flags if we're using GCC.
|
|
|
|
case "$GCC" in
|
|
|
|
yes)
|
|
|
|
CFLAGS="$CFLAGS -Wall"
|
|
|
|
CFLAGS="$CFLAGS -Wshadow"
|
|
|
|
CFLAGS="$CFLAGS -Wcast-qual"
|
|
|
|
CFLAGS="$CFLAGS -Wcast-align"
|
2004-09-26 13:16:33 +00:00
|
|
|
CFLAGS="$CFLAGS -Wchar-subscripts"
|
2004-06-03 03:38:44 +00:00
|
|
|
CFLAGS="$CFLAGS -Wmissing-prototypes"
|
|
|
|
CFLAGS="$CFLAGS -Wmissing-declarations"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
2004-08-13 16:58:19 +00:00
|
|
|
AC_CHECK_HEADERS(sys/param.h)
|
2004-06-03 03:38:44 +00:00
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_STRUCT_TM
|
|
|
|
AC_CHECK_TYPE(intmax_t, int64_t)
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(strtoimax strtoll)
|
2004-06-28 21:22:35 +00:00
|
|
|
AC_CHECK_FUNCS(mergesort)
|
2004-06-03 03:38:44 +00:00
|
|
|
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
AC_OUTPUT( \
|
|
|
|
skeletons/tests/Makefile \
|
2004-09-07 06:31:41 +00:00
|
|
|
libasn1compiler/Makefile \
|
2004-06-03 03:38:44 +00:00
|
|
|
libasn1parser/Makefile \
|
|
|
|
libasn1print/Makefile \
|
2004-09-19 19:40:52 +00:00
|
|
|
asn1c/webcgi/Makefile \
|
2004-06-03 03:38:44 +00:00
|
|
|
asn1c/tests/Makefile \
|
|
|
|
libasn1fix/Makefile \
|
|
|
|
skeletons/Makefile \
|
|
|
|
examples/Makefile \
|
|
|
|
tests/Makefile \
|
|
|
|
asn1c/Makefile \
|
|
|
|
doc/Makefile \
|
2004-09-19 19:40:52 +00:00
|
|
|
asn1c.spec \
|
2004-06-03 03:38:44 +00:00
|
|
|
Makefile \
|
|
|
|
)
|
|
|
|
|