File: configure.in

package info (click to toggle)
glade 0.6.4-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 12,240 kB
  • ctags: 3,884
  • sloc: ansic: 54,337; sh: 6,853; makefile: 795; sed: 93
file content (311 lines) | stat: -rw-r--r-- 8,692 bytes parent folder | download | duplicates (3)
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
dnl Process this file with autoconf to produce a configure script.

AC_INIT(glade/gbwidget.c)

AM_INIT_AUTOMAKE(glade, 0.6.4)
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

AM_PROG_XML_I18N_TOOLS

dnl Pick up GNOME macros
AM_ACLOCAL_INCLUDE(macros)

AC_ISC_POSIX

AM_PROG_LIBTOOL

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

AC_CHECK_HEADERS(os2.h)


dnl ***************************************************************************
dnl GTK+ - Checks the version and sets GTK_CFLAGS & GTK_LIBS.
dnl ***************************************************************************

AM_PATH_GTK(1.2.0,, AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))


dnl ***************************************************************************
dnl Gettext stuff.
dnl ***************************************************************************

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

dnl Set the location of the locale messages to be used in main.c
dnl This will substitute GLADE_LOCALE_DIR in config.h (from acconfig.h).
if test "x$prefix" = "xNONE"; then
  GLADE_LOCALE_DIR=$ac_default_prefix/share/locale
else
  GLADE_LOCALE_DIR=$prefix/share/locale
fi
AC_DEFINE_UNQUOTED(GLADE_LOCALE_DIR, "$GLADE_LOCALE_DIR")


dnl ***************************************************************************
dnl GLADE_DATA_DIR - Sets the location of the data directory, where we install
dnl source files added to projects (such as all the Gnome m4 macros).
dnl This will substitute GLADE_DATA_DIR in config.h (from acconfig.h).
dnl ***************************************************************************

if test "x${datadir}" = 'x${prefix}/share'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(GLADE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
  else
    AC_DEFINE_UNQUOTED(GLADE_DATA_DIR, "${prefix}/share/${PACKAGE}")
  fi
else
  AC_DEFINE_UNQUOTED(GLADE_DATA_DIR, "${datadir}/${PACKAGE}")
fi


dnl ***************************************************************************
dnl CFLAGS - Use -Wall if we have gcc, and use -ansi -pedantic if ansi enabled.
dnl ***************************************************************************

AC_ARG_ENABLE(ansi,
[  --enable-ansi           turn on strict ansi [default=no]],,enable_ansi=no)

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 ***************************************************************************
dnl Gnome Support (use --disable-gnome to disable).
dnl (Use "#ifdef USE_GNOME" in Glade for Gnome-specific code.)
dnl ***************************************************************************

gnome_modules=

AC_ARG_ENABLE(gnome,
[  --disable-gnome         disable use of gnome],
	gnome=$enableval, gnome=yes)

if test "x$gnome" = "xyes"; then
  AC_PATH_PROG(gnome_config, gnome-config)
  if test "x$gnome_config" = "x"; then
    gnome=no
  fi
fi

if test "$gnome" = yes; then
  AC_DEFINE(USE_GNOME)
  GLADE_GNOME_DIR="gnome"
  GLADE_GNOME_LIB="gnome/libgnomewidgets.a"
  AC_SUBST(GLADE_GNOME_DIR)
  AC_SUBST(GLADE_GNOME_LIB)
  gnome_modules="$gnome_modules gnomeui gnome gtk glib"
else
  CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
  LIBS="$LIBS $GTK_LIBS"
fi


dnl ***************************************************************************
dnl Check for ScrollKeeper
dnl ***************************************************************************
AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config, please install the scrollkeeper package)
fi
SCROLLKEEPER_REQUIRED=0.1.4
AC_SUBST(SCROLLKEEPER_REQUIRED)



dnl ***************************************************************************
dnl Check for Bonobo
dnl ***************************************************************************

try_bonobo=false
have_bonobo=false
bonobo_msg=no
using_oaf=no
AC_ARG_WITH(bonobo,
[  --with-bonobo           include Bonobo support (under development)],
	if test x$withval = xyes; then
	  try_bonobo=true
	fi)

if $try_bonobo; then
  AC_MSG_CHECKING(for Bonobo >= 0.27)
  if $gnome_config --libs bonobox > /dev/null 2>&1; then

    vers=`gnome-config --modversion bonobox | sed -e "s/bonobo-//" | \
          awk 'BEGIN { FS = "."; } { printf "%d", $1 * 1000 + $2;}'`
    if test "$vers" -ge 27; then
      bonobo_ok=true
    else
      bonobo_ok=false
    fi
  else
    bonobo_ok=false
  fi

  if $bonobo_ok; then
    AC_MSG_RESULT(found)
    AC_DEFINE(ENABLE_BONOBO)
    gnome_modules="$gnome_modules bonobox"
    have_bonobo=true
    bonobo_msg=yes

    dnl Check if Bonobo is OAFized

    AC_MSG_CHECKING(if Bonobo uses OAF)
    if ( gnome-config --libs bonobox | grep oaf ) > /dev/null 2>&1 ; then
      using_oaf="yes"
      AC_DEFINE(USING_OAF)
    fi
    AC_MSG_RESULT("$using_oaf")

    AM_CONDITIONAL(USING_OAF, test "x$using_oaf" = "xyes")

  else
    AC_MSG_RESULT(not found)
  fi
fi

AM_CONDITIONAL(BONOBO, $have_bonobo)

dnl ***************************************************************************
dnl Add all the cflags & libs needed for the Gnome modules.
dnl ***************************************************************************

if test "x$gnome_modules" != "x"; then
  GNOME_CFLAGS=`$gnome_config --cflags $gnome_modules 2>/dev/null`
  GNOME_LDFLAGS=`$gnome_config --libs $gnome_modules 2>/dev/null`
  CPPFLAGS="$CPPFLAGS $GNOME_CFLAGS"
  LIBS="$LIBS $GNOME_LDFLAGS"
fi


dnl ***************************************************************************
dnl Gnome-DB Support (use --enable-gnome-db to enable).
dnl ***************************************************************************

AC_ARG_ENABLE(gnome-db,
[  --enable-gnome-db      enable use of gnome-db],
	gnome_db=$enableval, gnome_db=yes)

if test "x$gnome" != "xyes"; then
  gnome_db=no
fi

if test "x$gnome_db" = "xyes"; then
  AC_PATH_PROG(gnomedb_config, gnomedb-config)
  if test "x$gnomedb_config" = "x"; then
    gnome_db=no
  else
    gnomedbminvers="0.2.93"
    AC_MSG_CHECKING(for gnome-db >= $gnomedbminvers)
    gnomedbver=`gnomedb-config --version | awk 'BEGIN {FS="."}{printf "%d", $1*10000+$2*100+$3}'`
    if test "$gnomedbver" -ge 293
    then
      AC_MSG_RESULT(found)
      gnome_db=yes
    else
      AC_MSG_WARN(not found)
      gnome_db=no
    fi
  fi
fi

if test "x$gnome_db" = "xyes"; then
  AC_DEFINE(USE_GNOME_DB)
  GLADE_GNOME_DB_DIR="gnome-db"
  GLADE_GNOME_DB_LIB="gnome-db/libgnomedbwidgets.a"
  AC_SUBST(GLADE_GNOME_DB_DIR)
  AC_SUBST(GLADE_GNOME_DB_LIB)

  GNOMEDB_CFLAGS=`gnomedb-config --cflags 2>/dev/null`
  GNOMEDB_LIBS=`gnomedb-config --libs 2>/dev/null`
  CPPFLAGS="$GNOMEDB_CFLAGS $CPPFLAGS"
  LIBS="$GNOMEDB_LIBS $LIBS"
fi


dnl ***************************************************************************
dnl Palette type - temporary option to try the different palette layouts.
dnl ***************************************************************************

AC_ARG_WITH(palette,
[  --with-palette=TYPE     select the palette type: damon or martijn],
	[if test "x$withval" = "xmartijn"; then
		PALETTE_TYPE=2
	   AC_MSG_RESULT(Picking Martijn's palette layout)
	 else
	 	PALETTE_TYPE=1
	   AC_MSG_RESULT(Picking Damon's palette layout)
	 fi],
	[PALETTE_TYPE=1])
AC_DEFINE_UNQUOTED(PALETTE_TYPE, $PALETTE_TYPE)
	

dnl ***************************************************************************
dnl Debugging - defines GLADE_DEBUG if --enable-debug option is used.
dnl ***************************************************************************

AC_ARG_ENABLE(debug,
[  --enable-debug          turn on debugging [default=no]],
	AC_DEFINE(GLADE_DEBUG),)


dnl ***************************************************************************
dnl Output the Makefiles etc.
dnl ***************************************************************************

AC_OUTPUT([
glade.spec
Makefile
xml-i18n-extract
xml-i18n-merge
xml-i18n-update
glade/Makefile
glade/gbwidgets/Makefile
glade/gnome/Makefile
glade/gnome-db/Makefile
glade/data/Makefile
glade/data/gtk/Makefile
macros/Makefile
intl/Makefile
po/Makefile.in
doc/Makefile
doc/C/Makefile
doc/it/Makefile
omf-install/Makefile
])

echo "

Configuration:

	Source code location:	${srcdir}
	Compiler:		${CC} 

	Gnome Support:		${gnome}
	Bonobo Support:		${bonobo_msg}
	Oaf Support:		${using_oaf}
	Gnome DB Support:	${gnome_db}
"