]> git.datanom.net - vcard-parser.git/blobdiff - configure.ac
New function
[vcard-parser.git] / configure.ac
index 92465fc42eefa09bb99f70ee3475d9cc39d6d2c3..9b9f85c4f8e780359c2e5f1879c3ceb774876f79 100644 (file)
@@ -2,8 +2,12 @@
 # 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)
+AC_INIT(libvcard, 0.1, mir@datanom.net)
+
+LIB_VERSION="0:0:0"
+AC_SUBST(LIB_VERSION)
+
+AC_CONFIG_SRCDIR(src/vcard.c)
 AM_INIT_AUTOMAKE
 AM_MAINTAINER_MODE
 AC_CONFIG_HEADER([config.h])
@@ -29,7 +33,7 @@ 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])
+PKG_CHECK_MODULES(GLIB, [[glib-2.0 >= 2.30 gmodule-2.0 >= 2.30 gobject-2.0 >= 2.30 gthread-2.0 >= 2.30]])
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
@@ -46,18 +50,16 @@ AC_TYPE_SSIZE_T
 # Optional building instructions
 if test $USE_MAINTAINER_MODE = yes; then
                 CFLAGS="$CFLAGS -g -Werror"
-               LIBS="$LIBS"
-                DEBUG="YES"
+               LIBS="$GLIB_LIBS"
 else
                 CFLAGS="$CFLAGS -O -O2"
-               LIBS="$LIBS"
-                DEBUG="NO"
+               LIBS="$GLIB_LIBS"
 fi
 
-AC_ARG_ENABLE(example,
+ac_enable_example="no"
+AC_ARG_ENABLE([example],
         [AC_HELP_STRING([--enable-example],[Build example [default=no]])],
-        [ac_enable_example=$enableval],
-        [ac_enable_example=no])
+        [ac_enable_example="${enableval}"])
 
 AC_MSG_CHECKING([whether to compile the example application])
 if test x"$ac_enable_example" = xyes; then
@@ -67,12 +69,15 @@ else
 fi
 AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
 
+AC_DEFINE_UNQUOTED(TEST_SRC_DIR, "$srcdir", [location of source code])
+
 AC_CONFIG_COMMANDS(
     [summary],
     [[echo ""
-    echo -e "libvcard will be compiled with these settings:"
+    echo -e "libvCard will be compiled with these settings:"
     echo -e "\tCFLAGS:\t\t${CFLAGS}"
     echo -e "\tLIBS:\t\t${LIBS}"
+    echo -e "\tExample:\t${EXAMPLE}"
     echo ""
     echo -e "Now run make to build library"
     echo ""
@@ -82,10 +87,12 @@ AC_CONFIG_COMMANDS(
     [
      CFLAGS="$CFLAGS"
      LIBS="$LIBS"
+     EXAMPLE="$ac_enable_example"
     ]
 )
 
 AC_OUTPUT([
     Makefile
+    example/Makefile
     src/Makefile
 ])
This page took 0.031418 seconds and 5 git commands to generate.