asn1c/configure.ac

90 lines
2.3 KiB
Plaintext
Raw Normal View History

2013-03-16 14:07:26 +00:00
AC_INIT([asn1c], [0.9.24], [vlm@lionet.info])
2010-11-09 11:10:36 +00:00
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
2004-06-03 03:38:44 +00:00
AM_PROG_LIBTOOL
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_YACC
AM_PROG_LEX
2005-03-30 05:14:26 +00:00
AC_PATH_PROG(AR, ar, ar, $PATH:/usr/ucb:/usr/ccs/bin) dnl for Solaris
2004-06-03 03:38:44 +00:00
2004-08-23 10:40:21 +00:00
case "$host_os" in
2006-03-18 06:39:12 +00:00
cygwin)
2004-08-23 10:40:21 +00:00
case "$target" in
*mingw*)
CC="$CC -mno-cygwin"
esac
;;
2006-03-18 06:24:33 +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
TESTSUITE_CFLAGS="-Werror -W -Wpointer-arith"
2014-01-14 10:15:13 +00:00
ADD_CFLAGS="-Werror -W -Wpointer-arith"
2004-09-26 14:10:37 +00:00
fi
2014-01-14 10:15:13 +00:00
AC_SUBST(ADD_CFLAGS)
AC_SUBST(TESTSUITE_CFLAGS)
2004-06-03 03:38:44 +00:00
AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
AX_CHECK_COMPILE_FLAG([-Wcast-qual], [CFLAGS="$CFLAGS -Wcast-qual"])
AX_CHECK_COMPILE_FLAG([-Wchar-subscripts],
[CFLAGS="$CFLAGS -Wchar-subscripts"])
AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes],
[CFLAGS="$CFLAGS -Wmissing-prototypes"])
AX_CHECK_COMPILE_FLAG([-Wmissing-declarations],
[CFLAGS="$CFLAGS -Wmissing-declarations"])
2004-06-03 03:38:44 +00:00
dnl There are legitimate uses for these features, disable warnings/errors.
AX_CHECK_COMPILE_FLAG([-Wno-error=cast-align],
[CFLAGS="$CFLAGS -Wno-error=cast-align"])
AX_CHECK_COMPILE_FLAG([-Wno-error=visibility],
[CFLAGS="$CFLAGS -Wno-error=visibility"])
AX_CHECK_COMPILE_FLAG([-Wno-error=parentheses-equality],
[CFLAGS="$CFLAGS -Wno-error=parentheses-equality"])
2004-06-03 03:38:44 +00:00
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)
dnl For mingw
AC_SEARCH_LIBS(getopt, iberty)
2004-06-03 03:38:44 +00:00
AC_CHECK_FUNCS(strtoimax strtoll)
2004-06-28 21:22:35 +00:00
AC_CHECK_FUNCS(mergesort)
2007-08-27 23:57:45 +00:00
AC_CHECK_FUNCS(mkstemps)
2006-03-06 11:33:39 +00:00
AC_OUTPUT( \
skeletons/standard-modules/Makefile \
skeletons/tests/Makefile \
libasn1compiler/Makefile \
libasn1parser/Makefile \
libasn1print/Makefile \
asn1c/tests/Makefile \
libasn1fix/Makefile \
2010-11-09 11:10:36 +00:00
doc/docsrc/Makefile \
2006-03-06 11:33:39 +00:00
skeletons/Makefile \
examples/Makefile \
tests/Makefile \
asn1c/Makefile \
doc/Makefile \
asn1c.spec \
Makefile \
2004-06-03 03:38:44 +00:00
)