File: configure.in

package info (click to toggle)
devhelp 0.3-10
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,056 kB
  • ctags: 1,261
  • sloc: ansic: 10,528; sh: 6,686; makefile: 422; yacc: 318; python: 253; lisp: 6
file content (204 lines) | stat: -rw-r--r-- 5,007 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
AC_INIT(src/Makefile.am)

DEVHELP_VERSION=0.3

GLIB_REQUIRED=1.2.9
GTK_REQUIRED=1.2.9
GNOME_REQUIRED=1.2.8
GNOME_LIBS_REQUIRED=1.2.8
GNOME_PRINT_REQUIRED=0.29
GNOME_VFS_REQUIRED=1.0.1
GDK_PIXBUF_REQUIRED=0.11.0
LIBXML_REQUIRED=1.8.14
LIBGLADE_REQUIRED=0.16
GTKHTML_REQUIRED=0.10.0
ORBIT_REQUIRED=0.5.7
OAF_REQUIRED=0.6.5
BONOBO_REQUIRED=1.0.6
GCONF_REQUIRED=1.0.4

AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(GNOME_REQUIRED)
AC_SUBST(GNOME_LIBS_REQUIRED)
AC_SUBST(GNOME_PRINT_REQUIRED)
AC_SUBST(GNOME_VFS_REQUIRED)
AC_SUBST(GDK_PIXBUF_REQUIRED)
AC_SUBST(LIBXML_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
AC_SUBST(GTKHTML_REQUIRED)
AC_SUBST(ORBIT_REQUIRED)
AC_SUBST(OAF_REQUIRED)
AC_SUBST(BONOBO_REQUIRED)
AC_SUBST(GCONF_REQUIRED)

dnl VERSION_CANON(version)
dnl                     1

AC_DEFUN(VERSION_CANON, [`

	dnl Assumes that there are no more than 999 revisions at a level,
	dnl no more than three levels of revision.
	dnl
	dnl Any more than that, and test starts messing up the numeric
	dnl comparisons because its integers overflow, and there's no
	dnl way to do string comparisons in the shell.  Grr.
	dnl
	dnl Must come up with some way to fix this.

	echo "$1" |
	tr . '\012' |
	sed -e 's/^/000/' -e 's/^.*\(...\)/\1/' |
	tr -d '\012' |
	sed 's/$/000000000/
	     s/^\(.........\).*/\1/'
`])

dnl VERSION_INSIST(package, get-version-cmd, operator, want-version-var)
dnl                1        2                3         4

AC_DEFUN(VERSION_INSIST, [
	want_version=[$]$4

	case "$3" in
		">")	g_operator=-gt ;;
		">=")	g_operator=-ge ;;
		"<")	g_operator=-lt ;;
		"<=")	g_operator=-le ;;
		"=")	g_operator=-eq ;;
		"!=")	g_operator=-ne ;;
		*)	AC_ERROR(Unknown operator $3 in configure script) ;;
	esac

	AC_MSG_CHECKING(for $1 $3 [$want_version])

	if installed_version="`$2`"
	then
		AC_MSG_RESULT([$installed_version])
	else
		AC_ERROR($2 failed)
	fi

	if test "VERSION_CANON([$installed_version])" "$g_operator" \
		"VERSION_CANON([$want_version])"
	then
		:
		AC_SUBST($4)
	else
		AC_ERROR($1 version [$want_version] is required.)
	fi
])

AM_INIT_AUTOMAKE(devhelp, $DEVHELP_VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AM_PROG_XML_I18N_TOOLS

AM_SANITY_CHECK

AC_PROG_CC
AC_PROG_CPP
AC_ISC_POSIX
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL

#AM_ACLOCAL_INCLUDE(macros)

dnl ** GLIB **
dnl
AM_PATH_GLIB($GLIB_REQUIRED,,
AC_MSG_ERROR([
*** GLIB $GLIB_REQUIRED or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org/.]))

dnl ** GTK **
dnl
AM_PATH_GTK($GTK_REQUIRED,,
AC_MSG_ERROR([
*** Gtk+ $GTK_REQUIRED or better is required. The latest version of GTK
*** is always available from ftp://ftp.gtk.org/.]))

AC_SUBST(GTK_REQUIRED)

dnl ** GNOME **
dnl
AM_PATH_GNOME($GNOME_REQUIRED,,AC_MSG_ERROR([*** GNOME $GNOME_REQUIRED or better is required.]), gtkhtml xml vfs bonobo print libglade)
AC_SUBST(GNOME_REQUIRED)

AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
if test x$GNOME_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find gnome-config. Please install the GNOME package)
fi
  
VERSION_INSIST(gnome-libs, $GNOME_CONFIG --version | awk '{print $2}', >=, GNOME_LIBS_REQUIRED)
VERSION_INSIST(xml, $GNOME_CONFIG --modversion xml | awk -F- '{print $2}', >=, LIBXML_REQUIRED)
VERSION_INSIST(gtkhtml, $GNOME_CONFIG --modversion gtkhtml | awk -F- '{print $2}', >=, GTKHTML_REQUIRED)
VERSION_INSIST(oaf, $GNOME_CONFIG --modversion oaf | awk -F- '{print $2}', >=, OAF_REQUIRED)
VERSION_INSIST(bonobo, $GNOME_CONFIG --modversion bonobo | awk -F- '{print $2}', >=, BONOBO_REQUIRED)
VERSION_INSIST(libglade, $GNOME_CONFIG --modversion libglade | awk -F- '{print $2}', >=, LIBGLADE_REQUIRED)

AC_SUBST(VFS_CFLAGS)
AC_SUBST(VFS_LIBS)
AC_SUBST(BONOBO_CFLAGS)
AC_SUBST(BONOBO_LIBS)
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
AC_SUBST(GTKHTML_CFLAGS)
AC_SUBST(GTKHTML_LIBS)
AC_SUBST(LIBGLADE_CFLAGS)
AC_SUBST(LIBGLADE_LIBS)

AM_PATH_ORBIT($ORBIT_REQUIRED,,AC_MSG_ERROR([ORBit $ORBIT_REQUIRED+ not installed or installation problem]))

IDL_FLAGS=`gnome-config --cflags idl`
AC_SUBST(IDL_FLAGS)

dnl GCONF
dnl 
AM_PATH_GCONF($GCONF_REQUIRED,,AC_MSG_ERROR([
*** gconf >= $GCONF_REQUIRED is required]),
gconf-gtk)

AC_ARG_ENABLE(install_schemas,
	[  --disable-install-schemas        Disable installation of the gconf schemas])
AM_CONDITIONAL(INSTALL_SCHEMAS, test x$enable_install_schemas != xno)

if test x$enable_install_schemas != xno; then
	AM_GCONF_SOURCE
fi
				 
# find the actual value for $prefix that we'll end up with
REAL_PREFIX=
if test "x$prefix" = "xNONE"; then
  REAL_PREFIX=$ac_default_prefix
else
  REAL_PREFIX=$prefix
fi

SYSCONFDIR_TMP="$sysconfdir"
old_prefix=$prefix
prefix=$REAL_PREFIX
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
prefix=$old_prefix
AC_SUBST(EXPANDED_SYSCONFDIR)

ALL_LINGUAS="de es fr it ja no pl ru sk sv zh_TW"
AM_GNOME_GETTEXT

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

PREFIX=$prefix
AC_SUBST(PREFIX)

AC_OUTPUT([
Makefile
devhelp.spec
intl/Makefile
po/Makefile.in
src/Makefile
ui/Makefile
])