+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.59)
+AC_INIT(llist, 0.1, mir@datanom.net)
+AC_CONFIG_SRCDIR(src/main.c)
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE
+AC_CONFIG_HEADER([config.h])
+CFLAGS="-Wall"
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CC
+AM_PROG_CC_STDC
+AC_LANG_C
+AC_ISC_POSIX
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+# Find pkg-config
+#
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test x$PKG_CONFIG = xno ; then
+ AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
+fi
+
+PKG_CHECK_MODULES(GLIB, [glib-2.0])
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+# Checks for header files.
+AC_HEADER_STDC
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+
+# Checks for library functions.
+
+# Optional building instructions
+if test $USE_MAINTAINER_MODE = yes; then
+ CFLAGS="$CFLAGS -g -Werror"
+ LIBS="$LIBS"
+ DEBUG="YES"
+else
+ CFLAGS="$CFLAGS -O -O2"
+ LIBS="$LIBS"
+ DEBUG="NO"
+fi
+
+AC_ARG_ENABLE(example,
+ [AC_HELP_STRING([--enable-example],[Build example [default=no]])],
+ [ac_enable_example=$enableval],
+ [ac_enable_example=no])
+
+AC_MSG_CHECKING([whether to compile the example application])
+if test x"$ac_enable_example" = xyes; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
+
+AC_CONFIG_COMMANDS(
+ [summary],
+ [[echo ""
+ echo -e "libvcard will be compiled with these settings:"
+ echo -e "\tCFLAGS:\t\t${CFLAGS}"
+ echo -e "\tLIBS:\t\t${LIBS}"
+ echo ""
+ echo -e "Now run make to build library"
+ echo ""
+ echo -e "Please send bugs or feature requests to the maintainer(s)."
+ echo -e "Email addresses can be found in the AUTHORS file."
+ echo ""]],
+ [
+ CFLAGS="$CFLAGS"
+ LIBS="$LIBS"
+ ]
+)
+
+AC_OUTPUT([
+ Makefile
+ src/Makefile
+])