]> git.datanom.net - vcard-parser.git/blob - configure.ac
initial
[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(llist, 0.1, mir@datanom.net)
6 AC_CONFIG_SRCDIR(src/main.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="$LIBS"
50 DEBUG="YES"
51 else
52 CFLAGS="$CFLAGS -O -O2"
53 LIBS="$LIBS"
54 DEBUG="NO"
55 fi
56
57 AC_ARG_ENABLE(example,
58 [AC_HELP_STRING([--enable-example],[Build example [default=no]])],
59 [ac_enable_example=$enableval],
60 [ac_enable_example=no])
61
62 AC_MSG_CHECKING([whether to compile the example application])
63 if test x"$ac_enable_example" = xyes; then
64 AC_MSG_RESULT(yes)
65 else
66 AC_MSG_RESULT(no)
67 fi
68 AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
69
70 AC_CONFIG_COMMANDS(
71 [summary],
72 [[echo ""
73 echo -e "libvcard will be compiled with these settings:"
74 echo -e "\tCFLAGS:\t\t${CFLAGS}"
75 echo -e "\tLIBS:\t\t${LIBS}"
76 echo ""
77 echo -e "Now run make to build library"
78 echo ""
79 echo -e "Please send bugs or feature requests to the maintainer(s)."
80 echo -e "Email addresses can be found in the AUTHORS file."
81 echo ""]],
82 [
83 CFLAGS="$CFLAGS"
84 LIBS="$LIBS"
85 ]
86 )
87
88 AC_OUTPUT([
89 Makefile
90 src/Makefile
91 ])
This page took 0.064147 seconds and 6 git commands to generate.