]> git.datanom.net - vcard-parser.git/blob - configure.ac
initialize
[vcard-parser.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.59)
5 AC_INIT(libvcard, 0.1, mir@datanom.net)
6 AC_CONFIG_SRCDIR(src/vcard.c)
7 AM_INIT_AUTOMAKE
8 AM_MAINTAINER_MODE
9 AC_CONFIG_HEADER([config.h])
10 CFLAGS="-Wall"
11 AC_CONFIG_MACRO_DIR([m4])
12
13 # Checks for programs.
14 AC_PROG_CC
15 AM_PROG_CC_STDC
16 AC_LANG_C
17 AC_ISC_POSIX
18 AC_PROG_INSTALL
19 AC_PROG_LN_S
20 AC_PROG_MAKE_SET
21 AC_PROG_CPP
22 AC_PROG_INSTALL
23 AC_PROG_LIBTOOL
24
25 # Find pkg-config
26 #
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/])
30 fi
31
32 PKG_CHECK_MODULES(GLIB, [glib-2.0])
33 AC_SUBST(GLIB_CFLAGS)
34 AC_SUBST(GLIB_LIBS)
35
36 # Checks for header files.
37 AC_HEADER_STDC
38
39 # Checks for typedefs, structures, and compiler characteristics.
40 AC_C_CONST
41 AC_TYPE_SIZE_T
42 AC_TYPE_SSIZE_T
43
44 # Checks for library functions.
45
46 # Optional building instructions
47 if test $USE_MAINTAINER_MODE = yes; then
48 CFLAGS="$CFLAGS -g -Werror"
49 LIBS="$GLIB_LIBS"
50 else
51 CFLAGS="$CFLAGS -O -O2"
52 LIBS="$GLIB_LIBS"
53 fi
54
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}"])
59
60 AC_MSG_CHECKING([whether to compile the example application])
61 if test x"$ac_enable_example" = xyes; then
62 AC_MSG_RESULT(yes)
63 else
64 AC_MSG_RESULT(no)
65 fi
66 AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
67
68 AC_CONFIG_COMMANDS(
69 [summary],
70 [[echo ""
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}"
75 echo ""
76 echo -e "Now run make to build library"
77 echo ""
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."
80 echo ""]],
81 [
82 CFLAGS="$CFLAGS"
83 LIBS="$LIBS"
84 EXAMPLE="$ac_enable_example"
85 ]
86 )
87
88 AC_OUTPUT([
89 Makefile
90 src/Makefile
91 ])
This page took 0.063598 seconds and 6 git commands to generate.