[go: up one dir, main page]

File: configure.ac

package info (click to toggle)
libgeier 0.9-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,836 kB
  • ctags: 422
  • sloc: sh: 8,849; ansic: 4,881; xml: 1,298; makefile: 268
file content (102 lines) | stat: -rw-r--r-- 3,091 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Configure.ac script for libgeier
# Copyright (C) 2005  Juergen Stuber <juergen@jstuber.net>, Germany
# Copyright (C) 2005,2006,2007,2008  Stefan Siegl <stesie@brokenpipe.de>, Germany
#
# This file is part of libgeier.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# 
# Process this file with autoconf to produce a configure script.

# FIXME: we need a proper project bugreport email address
AC_INIT([libgeier],[0.9],[taxbird@taxbird.de])
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(src/config.h)
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION, $PACKAGE_BUGREPORT)

AC_PREREQ(2.59)

AC_CONFIG_SRCDIR([libgeier.pc.in])

# checks for programs
AC_PROG_CC

AC_PROG_LIBTOOL

GTK_DOC_CHECK(1.0)

# compatibility for automake < 1.8
if test -z "$mkdir_p"; then
	mkdir_p='${top_srcdir}/mkinstalldirs'
	AC_SUBST(mkdir_p)
fi

# check for mozilla/xmlsec1-nss, libxml2 and libxslt using pkg-config ...
PKG_CHECK_MODULES(libxml, [libxml-2.0])
PKG_CHECK_MODULES(libxslt, [libxslt])

AC_ARG_WITH(nss, [  --with-nss              Use Mozilla NSS for cryptography],[
  if test "${with_nss}" = "no"; then
    crypto_module=nss
  else
    crypto_module=nss
  fi
])

AC_ARG_WITH(openssl, [  --with-openssl          Use OpenSSL for cryptography],[
  if test "${with_openssl}" = "no"; then
    crypto_module=nss
  else
    crypto_module=openssl
  fi
])

# if user didn't specify a module, try to guess ...
if test "x${crypto_module}" = "x"; then
  # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  PKG_CHECK_EXISTS(xmlsec1-nss, [crypto_module=nss], [
    PKG_CHECK_EXISTS(xmlsec1-openssl, [crypto_module=openssl], [
      AC_MSG_ERROR([no suitable crypto module found.])])])
fi

echo "Configured crypto_module: ${crypto_module}"
PKG_CHECK_MODULES(xmlsec, [xmlsec1-${crypto_module}])
#AM_CONDITIONAL(USE_NSS, test "${crypto_module}" = "nss")
AC_SUBST(crypto_module)

CFLAGS="$CFLAGS $libxml_CFLAGS $libxslt_CFLAGS $xmlsec_CFLAGS"
LDFLAGS="$LDFLAGS $libxml_LIBS $libxslt_LIBS $xmlsec_LIBS"

# check for zlib
AC_CHECK_LIB([z], [deflateBound],,AC_MSG_ERROR([libz library missing.]))


# output
AC_CONFIG_FILES([Makefile 
		 src/Makefile 
		 src/nss/Makefile
		 src/openssl/Makefile
		 include/Makefile 
		 include/geierversion.h
		 etc/Makefile 
		 etc/stylesheets/Makefile 
		 etc/schemas/Makefile 
		 config/Makefile
		 doc/Makefile 
		 doc/reference/Makefile
		 doc/reference/version.xml
		 tests/Makefile
		 libgeier.pc])
AC_OUTPUT