2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(libvcard, 0.1, mir@datanom.net)
6 AC_CONFIG_SRCDIR(src/vcard.c)
9 AC_CONFIG_HEADER([config.h])
11 AC_CONFIG_MACRO_DIR([m4])
13 # Checks for programs.
27 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
28 if test x$PKG_CONFIG = xno ; then
29 AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
32 PKG_CHECK_MODULES(GLIB, [glib-2.0])
36 # Checks for header files.
39 # Checks for typedefs, structures, and compiler characteristics.
44 # Checks for library functions.
46 # Optional building instructions
47 if test $USE_MAINTAINER_MODE = yes; then
48 CFLAGS="$CFLAGS -g -Werror"
51 CFLAGS="$CFLAGS -O -O2"
55 ac_enable_example="no"
56 AC_ARG_ENABLE([example],
57 [AC_HELP_STRING([--enable-example],[Build example [default=no]])],
58 [ac_enable_example="${enableval}"])
60 AC_MSG_CHECKING([whether to compile the example application])
61 if test x"$ac_enable_example" = xyes; then
66 AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
71 echo -e "libvcard will be compiled with these settings:"
72 echo -e "\tCFLAGS:\t\t${CFLAGS}"
73 echo -e "\tLIBS:\t\t${LIBS}"
74 echo -e "\tExample:\t${EXAMPLE}"
76 echo -e "Now run make to build library"
78 echo -e "Please send bugs or feature requests to the maintainer(s)."
79 echo -e "Email addresses can be found in the AUTHORS file."
84 EXAMPLE="$ac_enable_example"