File: configure.in

package info (click to toggle)
gconf 1.0.9-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,716 kB
  • ctags: 2,307
  • sloc: ansic: 60,480; sh: 9,208; makefile: 303
file content (262 lines) | stat: -rw-r--r-- 6,515 bytes parent folder | download | duplicates (2)
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
AC_DEFUN([AC_FYI], [echo "FYI: " $1])

AC_INIT(gconf/gconf.h)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(GConf, 1.0.9)

AM_MAINTAINER_MODE

AC_PROG_CC
AC_PROG_CXX
AC_ISC_POSIX
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL

changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac

  if test "x$enable_ansi" = "xyes"; then
    case " $CFLAGS " in
    *[\ \	]-ansi[\ \	]*) ;;
    *) CFLAGS="$CFLAGS -ansi" ;;
    esac

    case " $CFLAGS " in
    *[\ \	]-pedantic[\ \	]*) ;;
    *) CFLAGS="$CFLAGS -pedantic" ;;
    esac
  fi
fi
changequote([,])dnl

dnl used to rename everything and support simultaneous installs.
dnl not incremented for bugfix or unstable releases.
MAJOR_VERSION=1
AC_SUBST(MAJOR_VERSION)

GETTEXT_PACKAGE=gconf$MAJOR_VERSION
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")

dnl libtool versioning for guile wrapper

SCMGCONF_CURRENT=0
SCMGCONF_REVISION=0
SCMGCONF_AGE=0

AC_SUBST(SCMGCONF_CURRENT)
AC_SUBST(SCMGCONF_REVISION)
AC_SUBST(SCMGCONF_AGE)

dnl libtool versioning for GConfClient wrapper

GCONFGTK_CURRENT=1
GCONFGTK_REVISION=0
GCONFGTK_AGE=0

AC_SUBST(GCONFGTK_CURRENT)
AC_SUBST(GCONFGTK_REVISION)
AC_SUBST(GCONFGTK_AGE)

dnl libtool versioning for libgconf

dnl increment if the interface has additions, changes, removals.
GCONF_CURRENT=1

dnl increment any time the source changes; set to 
dnl  0 if you increment CURRENT
GCONF_REVISION=4

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.
GCONF_AGE=0

AC_SUBST(GCONF_CURRENT)
AC_SUBST(GCONF_REVISION)
AC_SUBST(GCONF_AGE)

# 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

# Have to go $sysconfdir->$prefix/etc->/usr/local/etc   
# if you actually know how to code shell then fix this :-)
SYSCONFDIR_TMP="$sysconfdir"
old_prefix=$prefix
prefix=$REAL_PREFIX
EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
prefix=$old_prefix
AC_SUBST(EXPANDED_SYSCONFDIR)

dnl Save flags to aclocal
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

dnl Specify the configuration source, default to xml::$(sysconfdir)/gconf/gconf.xml.defaults

GCONF_CONFIG_SOURCE=
AC_ARG_ENABLE(gconf-source, 
            [  --enable-gconf-source=sourceaddress      Where to install schema files.],GCONF_CONFIG_SOURCE=$enable_gconf_source,)

if test "x$GCONF_CONFIG_SOURCE" = "x"; then
        GCONF_CONFIG_SOURCE="xml::\${sysconfdir}/gconf/gconf.xml.defaults"
	INSTALL_GCONF_CONFIG_SOURCE="xml::\$(DESTDIR)\${sysconfdir}/gconf/gconf.xml.defaults"
        AC_FYI("Using default config source $GCONF_CONFIG_SOURCE for schema installation")
else
        AC_FYI("Using config source $GCONF_CONFIG_SOURCE for schema installation")
fi

AC_SUBST(GCONF_CONFIG_SOURCE)
AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)

dnl Default to no debug spew
AC_ARG_ENABLE(debug, 
            [  --enable-debug=[no/yes]      Compile with debug checks.],,enable_debug=no)

if test "x$enable_debug" = "xyes"; then
        CFLAGS="$CFLAGS -DGCONF_ENABLE_DEBUG=1"
        AC_FYI("Will build with debugging spew and checks")
else
        CFLAGS="$CFLAGS -DG_DISABLE_CHECKS=1 -DG_DISABLE_ASSERT=1"
        AC_FYI("Will build without debugging code")
fi

AC_ARG_ENABLE(docs, 
            [  --enable-docs=[no/yes]      Just do enough configure-foo to build HTML docs.],docs_only=yes,docs_only=no)

if test "x$docs_only" = "xyes"; then
        AC_FYI("Only building documentation")
else

AC_CHECK_LIB(popt, poptGetArg, POPT_LIBS=-lpopt,
	[AC_CHECK_HEADER(popt.h, , AC_MSG_ERROR([[
*** Couldn't find popt. Please download and install from
*** ftp://ftp.redhat.com/pub/redhat/code/popt and try again.]]))])
AC_SUBST(POPT_LIBS)

AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(glib not found or too old),gmodule)
AM_PATH_OAF(0.2.0,,AC_MSG_ERROR([OAF not found or too old]))
AM_PATH_GTK(1.2.0,,HAVE_GTK=no)

AM_CONDITIONAL(GTK, test x$HAVE_GTK != xno)

AC_PATH_PROG(XML_CONFIG,xml-config,no)
if test x$XML_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find xml-config need to install libxml)
fi
XML_LIBS=`$XML_CONFIG --libs`
XML_CFLAGS=`$XML_CONFIG --cflags`
if test "x$XML_LIBS" = x; then
  AC_MSG_ERROR(Failed to get link flags for libxml)
fi
AC_SUBST(XML_LIBS)
AC_SUBST(XML_CFLAGS)

BDB_LIBS=
BDB_CFLAGS=


for dblib in db-3.3 db-3.2 db-3.1 db-3; do
  AC_CHECK_LIB($dblib, db_env_create, BDB_LIBS=-l$dblib)
  if test "x$BDB_LIBS" != x; then
    break
  fi
done

if test "x$BDB_LIBS" = x; then
  AC_MSG_WARN(No db3 library found. Not building bdb backend.)
else
  AC_CHECK_HEADERS(db.h,  , AC_MSG_ERROR([db3 library found but db3/db.h not found]))
fi

AM_CONDITIONAL(BDB, test -n "$BDB_LIBS")

AC_SUBST(BDB_LIBS)
AC_SUBST(BDB_CFLAGS)

AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
if test x$ORBIT_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find orbit-config)
fi

ORBIT_LIBS=`$ORBIT_CONFIG --libs server`
ORBIT_CFLAGS=`$ORBIT_CONFIG --cflags server`
AC_SUBST(ORBIT_LIBS)
AC_SUBST(ORBIT_CFLAGS)

AC_PATH_PROG(GUILE_CONFIG,guile-config,no)
if (test x$GUILE_CONFIG = xno); then
  AC_MSG_WARN(didn't find guile-config, won't build Guile wrappers)
else
  GUILE_LIBS=`$GUILE_CONFIG link`
  GUILE_CFLAGS=`$GUILE_CONFIG compile`
fi
if (test -z "$GUILE_LIBS"); then
  AC_MSG_WARN(guile-config reports no libraries, won't build Guile wrappers)
fi

AM_CONDITIONAL(GUILE, test -n "$GUILE_LIBS")
AC_SUBST(GUILE_LIBS)
AC_SUBST(GUILE_CFLAGS)

AC_CHECK_HEADER(pthread.h, have_pthreads=yes)
AM_CONDITIONAL(PTHREADS, test -n "$have_pthreads")

AC_CHECK_FUNCS(nanosleep)
AC_CHECK_FUNCS(usleep)

AC_CHECK_FUNCS(flockfile)

fi # docs_only

ALL_LINGUAS="az ca cs da de el es eu fi fr ga gl hu it ja ko nl nn no pl pt pt_BR ru sk sl sv tr uk zh_CN"

AM_GCONF_GNU_GETTEXT

# AM_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(gconflocaledir)

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

## Just for debugging purposes
absolute_top_srcdir=`pwd`
AC_SUBST(absolute_top_srcdir)

AC_OUTPUT([
Makefile
gconf-config
gconf.spec
gconf.m4
gconf/Makefile
gconf/default.path
backends/Makefile
wrappers/Makefile
wrappers/gtk/Makefile
po/Makefile.in
doc/Makefile
doc/gconf/Makefile
examples/Makefile
tests/Makefile
standard-schemas/Makefile
gconf.pc
gconfgtk.pc
],
chmod +x gconf-config)