2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([libvcard],[0.1],[mir@datanom.net])
6 AC_COPYRIGHT([Copyright (c) 2024,2025 Michael Rasmussen.])
12 AC_CONFIG_HEADERS([config.h])
14 AC_CONFIG_MACRO_DIR([m4])
16 AC_CONFIG_SRCDIR(src/Makefile.am)
18 # Checks for programs.
29 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
30 if test x$PKG_CONFIG = xno ; then
31 AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
34 PKG_CHECK_MODULES(GLIB, [[glib-2.0 >= 2.30 gmodule-2.0 >= 2.30 gobject-2.0 >= 2.30 gthread-2.0 >= 2.30]])
38 # Checks for typedefs, structures, and compiler characteristics.
43 # Checks for library functions.
44 if test -n "$lt_prog_compiler_pic"; then
45 CFLAGS="$CFLAGS $lt_prog_compiler_pic"
48 # Checks for libraries.
49 PKG_CHECK_MODULES(CURL, [libcurl >= 7.15.5 gnutls])
53 # Optional building instructions
54 if test $USE_MAINTAINER_MODE = yes; then
55 CFLAGS="$CFLAGS -g -Werror"
58 CFLAGS="$CFLAGS -O -O2"
62 ac_enable_example="no"
63 AC_ARG_ENABLE([example],
64 [AS_HELP_STRING([--enable-example],[Build example [default=no]])],
65 [ac_enable_example="${enableval}"])
67 AC_MSG_CHECKING([whether to compile the example application])
68 if test x"$ac_enable_example" = xyes; then
73 AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
75 AC_DEFINE_UNQUOTED(TEST_SRC_DIR, "$srcdir", [location of source code])
80 echo -e "libvCard will be compiled with these settings:"
81 echo -e "\tCFLAGS:\t\t${CFLAGS}"
82 echo -e "\tLIBS:\t\t${LIBS}"
83 echo -e "\tExample:\t${EXAMPLE}"
85 echo -e "Now run make to build library"
87 echo -e "Please send bugs or feature requests to the maintainer(s)."
88 echo -e "Email addresses can be found in the AUTHORS file."
91 CFLAGS="$CFLAGS $CURL_CFLAGS"
92 LIBS="$LIBS $CURL_LIBS"
93 EXAMPLE="$ac_enable_example"