aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2010-11-09 03:10:36 -0800
committerLev Walkin <vlm@lionet.info>2010-11-09 03:26:07 -0800
commite7c4b9665540dc6d3f09f5efd1a6e13bb8f477f3 (patch)
tree82c7af80da5897addfa859ae4bcf53bb19d25414 /configure.ac
parent978eb142d488f6a908faeab33d24ab4cf9fe2374 (diff)
update automake and move doc -> docsrc
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac85
1 files changed, 85 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..08c0b571
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,85 @@
+AC_INIT([asn1c], [0.9.23], [vlm@lionet.info])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+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
+AC_PATH_PROG(AR, ar, ar, $PATH:/usr/ucb:/usr/ccs/bin) dnl for Solaris
+
+case "$host_os" in
+cygwin)
+ case "$target" in
+ *mingw*)
+ CC="$CC -mno-cygwin"
+ esac
+ ;;
+esac
+
+AC_ARG_ENABLE(Werror,
+ [ --enable-Werror abort compilation after any C compiler warning],
+ enable_werror=$enableval, enable_werror=no)
+if test x$enable_werror = xyes; then
+ ADD_CFLAGS="-Werror -W -Wpointer-arith"
+fi
+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"
+ CFLAGS="$CFLAGS -Wchar-subscripts"
+ CFLAGS="$CFLAGS -Wmissing-prototypes"
+ CFLAGS="$CFLAGS -Wmissing-declarations"
+ ;;
+esac
+
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS(sys/param.h)
+
+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)
+
+AC_CHECK_FUNCS(strtoimax strtoll)
+AC_CHECK_FUNCS(mergesort)
+AC_CHECK_FUNCS(mkstemps)
+
+AC_OUTPUT( \
+skeletons/standard-modules/Makefile \
+skeletons/tests/Makefile \
+libasn1compiler/Makefile \
+libasn1parser/Makefile \
+libasn1print/Makefile \
+asn1c/webcgi/Makefile \
+asn1c/tests/Makefile \
+libasn1fix/Makefile \
+doc/docsrc/Makefile \
+skeletons/Makefile \
+examples/Makefile \
+tests/Makefile \
+asn1c/Makefile \
+doc/Makefile \
+asn1c.spec \
+Makefile \
+)
+