]> git.datanom.net - vcard-parser.git/blame - configure.ac
initial
[vcard-parser.git] / configure.ac
CommitLineData
b198a81e
MR
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT(llist, 0.1, mir@datanom.net)
6AC_CONFIG_SRCDIR(src/main.c)
7AM_INIT_AUTOMAKE
8AM_MAINTAINER_MODE
9AC_CONFIG_HEADER([config.h])
10CFLAGS="-Wall"
11AC_CONFIG_MACRO_DIR([m4])
12
13# Checks for programs.
14AC_PROG_CC
15AM_PROG_CC_STDC
16AC_LANG_C
17AC_ISC_POSIX
18AC_PROG_INSTALL
19AC_PROG_LN_S
20AC_PROG_MAKE_SET
21AC_PROG_CPP
22AC_PROG_INSTALL
23AC_PROG_LIBTOOL
24
25# Find pkg-config
26#
27AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
28if test x$PKG_CONFIG = xno ; then
29 AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
30fi
31
32PKG_CHECK_MODULES(GLIB, [glib-2.0])
33AC_SUBST(GLIB_CFLAGS)
34AC_SUBST(GLIB_LIBS)
35
36# Checks for header files.
37AC_HEADER_STDC
38
39# Checks for typedefs, structures, and compiler characteristics.
40AC_C_CONST
41AC_TYPE_SIZE_T
42AC_TYPE_SSIZE_T
43
44# Checks for library functions.
45
46# Optional building instructions
47if test $USE_MAINTAINER_MODE = yes; then
48 CFLAGS="$CFLAGS -g -Werror"
49 LIBS="$LIBS"
50 DEBUG="YES"
51else
52 CFLAGS="$CFLAGS -O -O2"
53 LIBS="$LIBS"
54 DEBUG="NO"
55fi
56
57AC_ARG_ENABLE(example,
58 [AC_HELP_STRING([--enable-example],[Build example [default=no]])],
59 [ac_enable_example=$enableval],
60 [ac_enable_example=no])
61
62AC_MSG_CHECKING([whether to compile the example application])
63if test x"$ac_enable_example" = xyes; then
64 AC_MSG_RESULT(yes)
65else
66 AC_MSG_RESULT(no)
67fi
68AM_CONDITIONAL(BUILD_EXAMPLE, test x"$ac_enable_example" = "xyes")
69
70AC_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
88AC_OUTPUT([
89 Makefile
90 src/Makefile
91])
This page took 0.038762 seconds and 5 git commands to generate.