Minor modification on key frame decision
[libvpx.git] / nestegg / configure.ac
blob70f6e0d590e72733fe489204304533840c6e9a6c
1 dnl ------------------------------------------------
2 dnl Initialization and Versioning
3 dnl ------------------------------------------------
5 AC_INIT(libnestegg,[0.1git])
7 AC_CANONICAL_HOST
8 AC_CANONICAL_TARGET
10 AC_CONFIG_MACRO_DIR([m4])
12 AM_CONFIG_HEADER([config.h])
13 AC_CONFIG_SRCDIR([src/nestegg.c])
14 AM_INIT_AUTOMAKE
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
25 NESTEGG_CURRENT=0
26 NESTEGG_REVISION=0
27 NESTEGG_AGE=1
28 AC_SUBST(NESTEGG_CURRENT)
29 AC_SUBST(NESTEGG_REVISION)
30 AC_SUBST(NESTEGG_AGE)
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
39 cflags_save="$CFLAGS"
40 AC_PROG_CC
41 AC_PROG_CPP
42 CFLAGS="$cflags_save"
44 AM_PROG_CC_C_O
45 AC_LIBTOOL_WIN32_DLL
46 AM_PROG_LIBTOOL
48 dnl Check for doxygen
49 AC_ARG_ENABLE([doc],
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])
58         fi
59 else
60         HAVE_DOXYGEN=false
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
71 AC_PROG_LD
72 AC_PROG_LD_GNU
73 AC_MSG_CHECKING([how to control symbol export])
75 dnl --------------------------------------------------
76 dnl Do substitutions
77 dnl --------------------------------------------------
79 AC_SUBST(DEBUG)
80 AC_SUBST(PROFILE)
82 AC_OUTPUT([
83   Makefile 
84   docs/Makefile
85   docs/Doxyfile
86   nestegg.pc
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
96   doc_build="no"
97 else
98   doc_build="yes"
101 AC_MSG_RESULT([
102 ------------------------------------------------------------------------
103   $PACKAGE $VERSION:  Automatic configuration OK.
105   General configuration:
107     API Documentation: .......... ${doc_build}
109   Installation paths:
111     libnestegg: .................. ${LIBDIR}
112     C header files: .............. ${INCLUDEDIR}/nestegg
113     Documentation: ............... ${DOCDIR}
115   Building:
117     Type 'make' to compile $PACKAGE.
119     Type 'make install' to install $PACKAGE.
121   Example programs will be built but not installed.
122 ------------------------------------------------------------------------