source: trunk/third/eel/configure.in @ 21323

Revision 21323, 6.7 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21322, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT(eel)
2
3dnl ===========================================================================
4
5ART_REQUIRED=2.3.8
6GCONF_REQUIRED=1.1.11
7GDK_PIXBUF_REQUIRED=2
8GLIB_REQUIRED=2
9GNOME_REQUIRED=2.0
10GNOME_UI_REQUIRED=2.7.92
11GNOME_VFS_REQUIRED=2.7.91
12GTK_REQUIRED=2.3.0
13POPT_REQUIRED=1.5
14XML_REQUIRED=2.4.7
15GAIL_REQUIRED=0.16
16LIBGLADE_REQUIRED=2.0.0
17
18AC_SUBST(ART_REQUIRED)
19AC_SUBST(GCONF_REQUIRED)
20AC_SUBST(GDK_PIXBUF_REQUIRED)
21AC_SUBST(GLIB_REQUIRED)
22AC_SUBST(GNOME_REQUIRED)
23AC_SUBST(GNOME_UI_REQUIRED)
24AC_SUBST(GNOME_VFS_REQUIRED)
25AC_SUBST(GTK_REQUIRED)
26AC_SUBST(POPT_REQUIRED)
27AC_SUBST(XML_REQUIRED)
28AC_SUBST(GAIL_REQUIRED)
29AC_SUBST(LIBGLADE_REQUIRED)
30
31dnl ===========================================================================
32
33EEL_MAJOR_VERSION=2
34EEL_MINOR_VERSION=8
35EEL_MICRO_VERSION=2
36# If you need a modifier for the version number.
37# Normally empty, but can be used to make "fixup" releases.
38LIBGNOMEVFS_EXTRAVERSION=
39       
40EEL_VERSION=$EEL_MAJOR_VERSION.$EEL_MINOR_VERSION.$EEL_MICRO_VERSION$LIBGNOMEVFS_EXTRAVERSION
41EEL_VERSION_INFO=`expr $EEL_MAJOR_VERSION + $EEL_MINOR_VERSION`:$EEL_MICRO_VERSION:$EEL_MINOR_VERSION
42
43AC_SUBST(EEL_MAJOR_VERSION)
44AC_SUBST(EEL_MINOR_VERSION)
45AC_SUBST(EEL_MICRO_VERSION)
46AC_SUBST(EEL_VERSION)
47AC_SUBST(EEL_VERSION_INFO)
48
49VERSION=$EEL_VERSION
50
51AM_INIT_AUTOMAKE(eel, $VERSION)
52AM_CONFIG_HEADER(config.h)
53
54AM_MAINTAINER_MODE
55
56AC_ISC_POSIX
57AC_PROG_CC
58AC_PROG_CPP
59AC_PROG_AWK
60AM_DISABLE_STATIC
61AC_LIBTOOL_WIN32_DLL
62AM_PROG_LIBTOOL
63AC_STDC_HEADERS
64AM_SANITY_CHECK
65AC_PROG_INSTALL
66AC_PROG_LN_S
67AC_PROG_MAKE_SET
68AC_C_CONST
69AC_C_BIGENDIAN
70
71PKG_CHECK_MODULES(EEL, [
72        gail                    >= $GAIL_REQUIRED
73        gconf-2.0               >= $GCONF_REQUIRED
74        gdk-pixbuf-2.0          >= $GDK_PIXBUF_REQUIRED
75        glib-2.0                >= $GLIB_REQUIRED
76        gnome-vfs-2.0           >= $GNOME_VFS_REQUIRED
77        gnome-vfs-module-2.0    >= $GNOME_VFS_REQUIRED
78        gthread-2.0             >= $GLIB_REQUIRED
79        gtk+-2.0                >= $GTK_REQUIRED
80        libart-2.0              >= $ART_REQUIRED
81        libglade-2.0            >= $LIBGLADE_REQUIRED
82        libgnome-2.0            >= $GNOME_REQUIRED
83        libgnomeui-2.0          >= $GNOME_UI_REQUIRED
84        libxml-2.0              >= $XML_REQUIRED
85])
86AC_SUBST(EEL_CFLAGS)
87AC_SUBST(EEL_LIBS)
88
89dnl ===========================================================================
90
91dnl strftime checks
92
93AC_TRY_RUN([#include <time.h>
94                int main ()
95                {
96                  char buf[100];
97                  struct tm tm = {0};
98                  tm.tm_year = 99;
99                  if (strftime(buf, 100, "%EY", &tm) == 4 &&
100                      strcmp (buf, "1999")==0)
101                    return 0;
102                  return 1;
103                }
104            ],
105            AC_DEFINE(HAVE_STRFTIME_EXTENSION, 1, [Define if strftime supports %E and %O modifiers.])
106            )
107
108dnl ===========================================================================
109
110dnl X development libraries check
111
112#
113# If Pango included the shared library dependencies from X11 in
114# the pkg-config output, then we use that (to avoid duplicates).
115# but if they were omitted to avoid binary compatibility problems
116# then we need to repeat the checks.
117#
118if $PKG_CONFIG --exists pangoxft ; then
119  PANGO_PACKAGES="pangox pangoxft"
120else
121  PANGO_PACKAGES="pangox"
122fi
123
124x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
125case x_libs in
126  *-lX11*) pango_omitted_x_deps=no ;;
127  *)       pango_omitted_x_deps=yes ;;
128esac
129
130if test $pango_omitted_x_deps = yes ; then
131  AC_PATH_XTRA
132
133  if test x$no_x = xyes ; then
134    AC_MSG_ERROR([X development libraries not found])
135  else
136    X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
137  fi
138fi
139
140AC_SUBST(X_LIBS)
141
142dnl ===========================================================================
143
144ALL_LINGUAS="am ang ar az be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja kn ko li lt lv mk ml mn mr ms nb ne nl nn no or pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW"
145
146GETTEXT_PACKAGE=eel-2.0
147AC_SUBST(GETTEXT_PACKAGE)
148AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
149AC_DEFINE_UNQUOTED(GNOME_EXPLICIT_TRANSLATION_DOMAIN, "$GETTEXT_PACKAGE")
150
151AM_GLIB_GNU_GETTEXT
152
153# AM_GNOME2_GETTEXT above substs $DATADIRNAME
154# this is the directory where the *.{mo,gmo} files are installed
155gnomelocaledir='${prefix}/${DATADIRNAME}/locale'
156AC_SUBST(gnomelocaledir)
157
158AC_CHECK_FUNCS(bind_textdomain_codeset)
159
160dnl ===========================================================================
161
162AC_PROG_AWK
163AC_CHECK_PROGS(PERL, perl5 perl)
164AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
165
166dnl ===========================================================================
167
168ENABLE_PROFILER=
169AC_ARG_ENABLE(profiler,
170[  --enable-profiler            Enable profiler],
171ENABLE_PROFILER=1
172AC_DEFINE(ENABLE_PROFILER))
173
174if test "x$ENABLE_PROFILER" = "x1"
175then
176        CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES"
177        LDFLAGS="/gnome/PROFILE/lib/libprofiler.so -lpthread"
178fi
179
180AC_SUBST(ENABLE_PROFILER)
181AM_CONDITIONAL(ENABLE_PROFILER, test "x$ENABLE_PROFILER" = "x1")
182
183dnl ===========================================================================
184
185AC_CHECK_LIB(popt, poptParseArgvString, [POPT_LIBS="-lpopt"])
186AC_SUBST(POPT_LIBS)
187
188dnl ===========================================================================
189
190AC_CHECK_FUNCS(setenv unsetenv putenv)
191
192dnl ===========================================================================
193
194
195#
196# Checks for Xft/XRender
197#
198have_render=false
199RENDER_LIBS=""
200
201AC_CHECK_LIB(Xrender, XRenderFindFormat,
202    have_render=true,:,-lXext $EEL_LIBS)
203
204if $have_render ; then
205   RENDER_LIBS="-lXrender -lXext"
206   AC_DEFINE(HAVE_RENDER)
207fi
208
209AC_SUBST(RENDER_LIBS)
210
211
212dnl ===========================================================================
213
214dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
215
216AC_ARG_ENABLE(more-warnings,
217[  --enable-more-warnings  Maximum compiler warnings],
218set_more_warnings="$enableval",[
219if test -f $srcdir/CVSVERSION; then
220        is_cvs_version=true
221        set_more_warnings=yes
222else
223        set_more_warnings=no
224fi
225])
226AC_MSG_CHECKING(for more warnings, including -Werror)
227if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
228        AC_MSG_RESULT(yes)
229        CFLAGS="\
230        -Wall \
231        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
232        -Wnested-externs -Wpointer-arith \
233        -Wsign-compare \
234        -Werror \
235        $CFLAGS"
236
237        for option in -Wno-strict-aliasing -Wno-sign-compare; do
238                SAVE_CFLAGS="$CFLAGS"
239                CFLAGS="$CFLAGS $option"
240                AC_MSG_CHECKING([whether gcc understands $option])
241                AC_TRY_COMPILE([], [],
242                        has_option=yes,
243                        has_option=no,)
244                if test $has_option = no; then
245                        CFLAGS="$SAVE_CFLAGS"
246                fi
247                AC_MSG_RESULT($has_option)
248                unset has_option
249                unset SAVE_CFLAGS
250        done
251        unset option
252else
253        AC_MSG_RESULT(no)
254fi
255
256dnl ===========================================================================
257
258AC_OUTPUT([
259Makefile
260eel-2.0.pc
261eel-2.0-uninstalled.pc
262eel.spec
263eel/Makefile
264eel/eel-features.h
265po/Makefile.in
266test/Makefile
267])
Note: See TracBrowser for help on using the repository browser.