1 dnl ------------------------------------------------
2 dnl Initialization and Versioning
3 dnl ------------------------------------------------
5 AC_INIT(libnestegg,[0.1git])
10 AC_CONFIG_MACRO_DIR([m4])
12 AM_CONFIG_HEADER([config.h])
13 AC_CONFIG_SRCDIR([src/nestegg.c])
16 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
18 dnl Library versioning
19 dnl CURRENT, REVISION, AGE
20 dnl - library source changed -> increment REVISION
21 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
22 dnl - interfaces added -> increment AGE
23 dnl - interfaces removed -> AGE = 0
28 AC_SUBST(NESTEGG_CURRENT)
29 AC_SUBST(NESTEGG_REVISION)
33 dnl --------------------------------------------------
34 dnl Check for programs
35 dnl --------------------------------------------------
37 dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
38 dnl if $CFLAGS is blank
50 AS_HELP_STRING([--enable-doc], [Build API documentation]),
51 [ac_enable_doc=$enableval], [ac_enable_doc=auto])
53 if test "x$ac_enable_doc" != "xno"; then
54 AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
56 if test "x$HAVE_DOXYGEN" = "xfalse" -a "x$ac_enable_doc" = "xyes"; then
57 AC_MSG_ERROR([*** API documentation explicitly requested but Doxygen not found])
62 AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN)
63 if test $HAVE_DOXYGEN = "false"; then
64 AC_MSG_WARN([*** doxygen not found, API documentation will not be built])
67 # Generate portable stdint.h replacement
68 AX_CREATE_STDINT_H(include/nestegg/nestegg-stdint.h)
70 # Test whenever ld supports -version-script
73 AC_MSG_CHECKING([how to control symbol export])
75 dnl --------------------------------------------------
77 dnl --------------------------------------------------
87 nestegg-uninstalled.pc
90 AS_AC_EXPAND(LIBDIR, ${libdir})
91 AS_AC_EXPAND(INCLUDEDIR, ${includedir})
92 AS_AC_EXPAND(BINDIR, ${bindir})
93 AS_AC_EXPAND(DOCDIR, ${docdir})
95 if test $HAVE_DOXYGEN = "false"; then
102 ------------------------------------------------------------------------
103 $PACKAGE $VERSION: Automatic configuration OK.
105 General configuration:
107 API Documentation: .......... ${doc_build}
111 libnestegg: .................. ${LIBDIR}
112 C header files: .............. ${INCLUDEDIR}/nestegg
113 Documentation: ............... ${DOCDIR}
117 Type 'make' to compile $PACKAGE.
119 Type 'make install' to install $PACKAGE.
121 Example programs will be built but not installed.
122 ------------------------------------------------------------------------