File: configure.in

package info (click to toggle)
glibwww 0.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 804 kB
  • ctags: 138
  • sloc: sh: 7,991; ansic: 1,094; makefile: 129
file content (106 lines) | stat: -rw-r--r-- 2,365 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
103
104
105
106
dnl Initialization

AC_INIT(src/glibwww-init.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(glibwww, 0.2)

AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)

GNOME_INIT

AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL

GNOME_COMPILE_WARNINGS

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

dnl GNU regex checking

AC_CHECK_FUNC(re_compile_pattern, AC_DEFINE(HAVE_GNU_REGEX))

dnl Libwww checks.

AC_MSG_CHECKING([for libwww])
if ! `libwww-config --version > /dev/null 2>&1` ; then
	AC_MSG_RESULT([not found])
	have_libwww=false
else
	vers=`libwww-config --version`
	AC_MSG_RESULT([found ("$vers")])

	LIBWWW_CFLAGS="`libwww-config --cflags`"
	LIBWWW_LIBS="`libwww-config --libs`"

	AC_MSG_CHECKING([if libwww has zlib support built-in])
	if ( libwww-config --libs | grep -w -- '-lz' > /dev/null ) ; then
		AC_MSG_RESULT([yes])
		have_libwww=true
	else
		AC_MSG_RESULT([no])
		AC_MSG_WARN([libwww should be built with zlib support to be usable by the test program.])
		AC_MSG_WARN([Your libwww does not seem to have zlib support.])
		have_libwww=false
	fi
fi

if $have_libwww ; then
	AC_DEFINE(HAVE_LIBWWW)
else
	AC_MSG_WARN([\`testglibwww' will not be built.])
fi

AC_SUBST(LIBWWW_CFLAGS)
AC_SUBST(LIBWWW_LIBS)
AM_CONDITIONAL(LIBWWW, $have_libwww)


EXTRA_GNOME_LIBS="`gnome-config --libs gnomeui` $LIBWWW_LIBS"
EXTRA_GNOME_CFLAGS="`gnome-config --cflags` $LIBWWW_CFLAGS"

AC_SUBST(EXTRA_GNOME_LIBS)
AC_SUBST(EXTRA_GNOME_CFLAGS)

dnl glibwwwConf.sh stuff.

GLIBWWW_LIBDIR="-L${libdir}"
GLIBWWW_INCLUDEDIR="-I${includedir}"
GLIBWWW_INCLUDEDIR="$GLIBWWW_INCLUDEDIR `$GNOME_CONFIG --cflags gnome gnomeui` $LIBWWW_CFLAGS"
GLIBWWW_LIBS="-lglibwww `$GNOME_CONFIG --libs gnome  gnomeui` $LIBWWW_CFLAGS"

AC_SUBST(GLIBWWW_LIBDIR)
AC_SUBST(GLIBWWW_INCLUDEDIR)
AC_SUBST(GLIBWWW_LIBS)

dnl Library version information.
 
dnl Increment the following if the interface has additions, changes,
dnl removals.
GLIBWWW_CURRENT=1

dnl Increment any time the source changes; set to 0 if you
dnl increment CURRENT.
GLIBWWW_REVISION=0

dnl Increment if any interfaces have been added; set to 0
dnl if any interfaces have been removed. removal has 
dnl precedence over adding, so set to 0 if both happened.
GLIBWWW_AGE=0

AC_SUBST(GLIBWWW_CURRENT)
AC_SUBST(GLIBWWW_REVISION)
AC_SUBST(GLIBWWW_AGE)

dnl Done.

AC_OUTPUT([
Makefile
macros/Makefile
src/Makefile
])