2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(libvcard, 0.1, mir@datanom.net)
10 AC_CONFIG_SRCDIR(src/vcard.c)
13 AC_CONFIG_HEADER([config.h])
15 AC_CONFIG_MACRO_DIR([m4])
17 # Checks for programs.
31 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
32 if test x$PKG_CONFIG = xno ; then
33 AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
36 PKG_CHECK_MODULES(GLIB, [[glib-2.0 >= 2.30 gmodule-2.0 >= 2.30 gobject-2.0 >= 2.30 gthread-2.0 >= 2.30]])
40 # Checks for header files.
43 # Checks for typedefs, structures, and compiler characteristics.
48 # Checks for library functions.
50 # Optional building instructions
51 if test $USE_MAINTAINER_MODE = yes; then
52 CFLAGS="$CFLAGS -g -Werror"
55 CFLAGS="$CFLAGS -O -O2"
59 ac_enable_example="no"
60 AC_ARG_ENABLE([example],
61 [AC_HELP_STRING([--enable-example],[Build example [default=no]])],
62 [ac_enable_example="${enableval}"])
64 AC_MSG_CHECKING([whether to compile the example application])
65 if test x"$ac_enable_example" = xyes; then
70 AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
72 AC_DEFINE_UNQUOTED(TEST_SRC_DIR, "$srcdir", [location of source code])
77 echo -e "libvCard will be compiled with these settings:"
78 echo -e "\tCFLAGS:\t\t${CFLAGS}"
79 echo -e "\tLIBS:\t\t${LIBS}"
80 echo -e "\tExample:\t${EXAMPLE}"
82 echo -e "Now run make to build library"
84 echo -e "Please send bugs or feature requests to the maintainer(s)."
85 echo -e "Email addresses can be found in the AUTHORS file."
90 EXAMPLE="$ac_enable_example"