blob: ea31dbbf94402f599a4a4fa703ac3f6977a497a9 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001dnl Process this file with autoconf to produce a configure script.
2AC_INIT(libasn1parser/asn1p_y.y)
3AC_CANONICAL_SYSTEM
4AC_PREREQ(2.53)
Lev Walkin67c2aec2004-06-05 08:47:18 +00005AM_INIT_AUTOMAKE(asn1c, 0.8.11)
Lev Walkinf15320b2004-06-03 03:38:44 +00006
7AC_SUBST(PATH)
8
9AM_MAINTAINER_MODE
10
11AM_PROG_LIBTOOL
12
13dnl *** Autoconf support ***
14AC_ARG_ENABLE(autoconf,
15 [ --disable-autoconf disable automatic generation of configure script ],
16 enable_autoconf=$enableval, enable_autoconf=yes
17)
18AC_PATH_PROG(AUTOCONF, autoconf, @echo autoconf not available)
19AC_PATH_PROG(AUTOHEADER, autoheader, @echo autoheader not available)
20if test -z "$AUTOCONF"; then enable_autoconf=no ; fi
21if test -z "$AUTOHEADER"; then enable_autoconf=no ; fi
22if test x$enable_autoconf = xyes; then
23 CONFIGURE_DEPENDS="configure.in aclocal.m4"
24fi
25AC_SUBST(CONFIGURE_DEPENDS)
26
27dnl Checks for programs.
28AC_PROG_CC
29AC_PROG_CPP
30AC_PROG_INSTALL
31AC_PROG_LN_S
32AC_PROG_MAKE_SET
33AC_PROG_YACC
34AM_PROG_LEX
35AC_PATH_PROG(AR, ar, ar, $PATH:/usr/ucb:/usr/ccs/bin)
36
37dnl *** Building mingw32 with cygwin compiler ***
38case "$build" in
39*cygwin*)
40 case "$target" in
41 *mingw*)
42 CC="$CC -mno-cygwin"
43 esac ;;
44esac
45
46AC_ARG_ENABLE(autoconf,
47 [ --enable-Werror abort compilation after any C compiler warning],
Lev Walkin67c2aec2004-06-05 08:47:18 +000048 ADD_CFLAGS="-Werror -W")
Lev Walkinf15320b2004-06-03 03:38:44 +000049AC_SUBST(ADD_CFLAGS)
50
51dnl Add these flags if we're using GCC.
52case "$GCC" in
53 yes)
54 CFLAGS="$CFLAGS -Wall"
55 CFLAGS="$CFLAGS -Wshadow"
56 CFLAGS="$CFLAGS -Wcast-qual"
57 CFLAGS="$CFLAGS -Wcast-align"
58 CFLAGS="$CFLAGS -Wmissing-prototypes"
59 CFLAGS="$CFLAGS -Wmissing-declarations"
60 CFLAGS="$CFLAGS -Wredundant-decls"
61 CFLAGS="$CFLAGS -Wnested-externs"
62 ;;
63esac
64
65
66dnl Checks for header files.
67AC_HEADER_STDC
68AC_CHECK_HEADERS(errno.h)
69
70dnl Checks for typedefs, structures, and compiler characteristics.
71AC_C_BIGENDIAN
72AC_TYPE_OFF_T
73AC_TYPE_SIZE_T
74AC_STRUCT_TM
75AC_CHECK_TYPE(intmax_t, int64_t)
76
77AC_CHECK_FUNCS(strtoimax strtoll)
78
79AM_CONFIG_HEADER(config.h)
80
81AC_OUTPUT( \
82libasn1compiler/Makefile \
83skeletons/tests/Makefile \
84libasn1parser/Makefile \
85libasn1print/Makefile \
86asn1c/tests/Makefile \
87libasn1fix/Makefile \
88skeletons/Makefile \
89examples/Makefile \
90tests/Makefile \
91asn1c/Makefile \
92doc/Makefile \
93Makefile \
94)
95