source: trunk/third/gnome-mag/configure.in @ 21385

Revision 21385, 7.7 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21384, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Process this file with autoconf to produce a configure script.
2
3dnl required versions of other tools.
4m4_define([req_ver_glib],       [1.3.11])
5m4_define([req_ver_gtk],        [2.1.0])
6m4_define([req_ver_libbonobo],  [1.107.0])
7m4_define([req_ver_libspi],     [0.12.1])
8m4_define([req_ver_orbit],      [2.3.100])
9
10AC_INIT(magnifier/magnifier.c)
11
12dnl libtool versioning from libgnome
13
14GNOME_MAG_MAJOR_VERSION=0
15GNOME_MAG_MINOR_VERSION=11
16GNOME_MAG_INTERFACE_AGE=9
17dnl below should change if the interface has additions, changes, removals.
18GNOME_MAG_CURRENT=`expr $GNOME_MAG_MINOR_VERSION - $GNOME_MAG_INTERFACE_AGE`
19
20dnl increment any time the source you release changes; set to
21dnl 0 if you increment CURRENT
22GNOME_MAG_REVISION=14
23GNOME_MAG_MICRO_VERSION=$GNOME_MAG_REVISION
24
25dnl increment if any interfaces have been added; set to 0
26dnl  if any interfaces have been removed. removasl has
27dnl  precedence over adding, so set to 0 if both happened.
28GNOME_MAG_AGE=0
29
30AC_SUBST(GNOME_MAG_CURRENT)
31AC_SUBST(GNOME_MAG_REVISION)
32AC_SUBST(GNOME_MAG_AGE)
33LT_VERSION_INFO='-version-info ${GNOME_MAG_CURRENT}:${GNOME_MAG_REVISION}:${GNOME_MAG_AGE}'
34AC_SUBST(LT_VERSION_INFO)
35
36AM_CONFIG_HEADER(config.h)
37GNOME_MAG_VERSION="$GNOME_MAG_MAJOR_VERSION.$GNOME_MAG_MINOR_VERSION.$GNOME_MAG_MICRO_VERSION"
38AM_INIT_AUTOMAKE(gnome-mag, $GNOME_MAG_VERSION)
39AM_MAINTAINER_MODE
40
41AC_PROG_INTLTOOL
42
43AC_PROG_CC
44AC_LIBTOOL_WIN32_DLL
45AC_PROG_INSTALL
46AC_ISC_POSIX
47
48dnl GNOME_COMPILE_WARNINGS(maximum)
49
50AM_DISABLE_STATIC
51AM_PROG_LIBTOOL
52
53ALL_LINGUAS="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 gu he hi hr hu id is it ja ka ko lt lv mi mn ms nb ne nl nn no or pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tk tr uk vi zh_CN zh_TW"
54GETTEXT_PACKAGE=gnome-mag
55AC_SUBST(GETTEXT_PACKAGE)
56AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext package])
57
58AM_GLIB_GNU_GETTEXT
59
60AC_MSG_CHECKING([for Win32])
61case "$host" in
62  *-*-mingw*)
63    gnome_mag_native_win32=yes
64    ;;
65  *)
66    gnome_mag_native_win32=no
67    ;;
68esac
69AC_MSG_RESULT([$gnome_mag_native_win32])
70AM_CONDITIONAL(OS_WIN32, test "$gnome_mag_native_win32" = "yes")
71
72if test "$gnome_mag_native_win32" = "yes"; then
73  AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
74fi
75AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
76
77dnl Cache $ACLOCAL_FLAGS
78AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
79   ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
80])
81ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
82
83AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
84
85AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=no)
86if test "$enable_debug" = "yes"; then
87  GNOME_MAG_DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
88else
89  GNOME_MAG_DEBUG_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED"
90fi
91AC_SUBST(GNOME_MAG_DEBUG_CFLAGS)
92
93changequote(,)dnl
94if test "x$GCC" = "xyes"; then
95  case " $CFLAGS " in
96  *[\ \ ]-Wall[\ \      ]*) ;;
97  *) CFLAGS="$CFLAGS -Wall" ;;
98  esac
99fi
100changequote([,])dnl
101
102AC_PATH_XTRA
103
104dnl test for X libraries
105if test x$no_x = xyes ; then
106  AC_MSG_ERROR([X development libraries not found])
107else
108  X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
109fi
110
111dnl path to Xtst
112AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst)
113if test "x$XTST_LIBS" = x; then
114  save_LIBS="$LIBS"
115  for xtstpath in /usr/X11R6/lib /usr/openwin/lib $x_libraries; do
116    LIBS="-L$xtstpath -lXtst"
117    case "$host" in
118    *solaris*) XTST_RPATH_FLAGS="-R$xtstpath" ;;
119    esac
120    AC_MSG_CHECKING(for -lXtst in $xtstpath)
121    AC_TRY_LINK([], [XTestFakeKeyEvent()], [
122        AC_MSG_RESULT(yes)
123        XTST_LIBS="$XTST_RPATH_FLAGS -L$xtstpath -lXtst"
124        LIBS="$save_LIBS"
125        break],[AC_MSG_RESULT(no)])
126  done
127  if test "x$XTST_LIBS" = x; then
128    AC_MSG_ERROR(Couldn't find the Xtst library. Check config.log for details)
129  else
130    X_LIBS="$X_LIBS $XTST_LIBS"
131    AC_DEFINE(HAVE_XTST, 1, [The XTest extension is present])
132  fi
133fi
134
135dnl path to DAMAGE
136AC_CHECK_LIB(Xdamage, XDamageCreate, XDAMAGE_LIBS=-lXdamage)
137if test "x$XDAMAGE_LIBS" = x; then
138  save_LIBS="$LIBS"
139  for xdamagepath in /usr/X11R6/lib /usr/openwin/lib /usr/openwin/sfw/lib /opt/fdo/lib $x_libraries; do
140    LIBS="-L$xdamagepath -lXdamage -lX11"
141    case "$host" in
142    *solaris*) XDAMAGE_RPATH_FLAGS="-R$xdamagepath" ;;
143    esac
144    AC_MSG_CHECKING(for -lXdamage in $xdamagepath)
145    AC_TRY_LINK([], [XDamageCreate()], [
146        AC_MSG_RESULT(yes)
147        XDAMAGE_LIBS="$XDAMAGE_RPATH_FLAGS -L$xdamagepath -lXdamage"
148        LIBS="$save_LIBS"
149        break],[AC_MSG_RESULT(no)])
150  done
151  if test "x$XDAMAGE_LIBS" = x; then
152    AC_MSG_WARN(Couldn't find the DAMAGE library. Check config.log for details)
153    LIBS="$save_LIBS"
154  else
155    X_LIBS="$X_LIBS $XDAMAGE_LIBS"
156    CFLAGS="-I /opt/fdo/include $CFLAGS"
157    AC_CHECK_HEADER(X11/extensions/Xdamage.h, have_xdamage=yes)
158    if test "x$have_xdamage" = x; then
159      AC_CHECK_HEADER(X11/Xdamage.h, have_xdamage=yes)
160    fi
161    AC_DEFINE(HAVE_DAMAGE, 1, [The DAMAGE extension is present])
162  fi
163fi
164
165dnl path to XFIXES
166AC_CHECK_LIB(Xfixes, XFixesCreateRegion, XFIXES_LIBS=-lXfixes)
167if test "x$XFIXES_LIBS" = x; then
168  save_LIBS="$LIBS"
169  for xfixespath in /usr/X11R6/lib /usr/openwin/lib /usr/openwin/sfw/lib /opt/fdo/lib $x_libraries; do
170    LIBS="-L$xfixespath -lXfixes -lX11"
171    case "$host" in
172    *solaris*) XFIXES_RPATH_FLAGS="-R$xfixespath" ;;
173    esac
174    AC_MSG_CHECKING(for -lXfixes in $xfixespath)
175    AC_TRY_LINK([], [XFixesCreateRegion()], [
176        AC_MSG_RESULT(yes)
177        XFIXES_LIBS="$XFIXES_RPATH_FLAGS -L$xfixespath -lXfixes"
178        LIBS="$save_LIBS"
179        break],[AC_MSG_RESULT(no)])
180  done
181  if test "x$XFIXES_LIBS" = x; then
182    AC_MSG_WARN(Couldn't find the XFIXES library. Check config.log for details)
183    LIBS="$save_LIBS"
184  else
185    X_LIBS="$X_LIBS $XFIXES_LIBS"
186    CFLAGS="-I /opt/fdo/include $CFLAGS"
187    AC_CHECK_HEADER(X11/extensions/Xfixes.h, have_xfixes=yes)
188    AC_DEFINE(HAVE_XFIXES, 1, [The XFIXES extension is present])
189  fi
190fi
191
192AC_SUBST(X_LIBS)
193
194PKG_CHECK_MODULES(DEPS, [
195        libloginhelper-1.0      >= 1.5.2
196        libbonobo-2.0           >= 1.107.0
197        ORBit-2.0               >= 2.3.100
198        glib-2.0                >= 1.3.11
199        gtk+-2.0                >= 2.1.0
200        gdk-pixbuf-2.0          >= 2.1.0
201        gdk-pixbuf-xlib-2.0     >= 2.1.0
202])
203AC_SUBST(DEPS_LIBS)
204DEPS_CFLAGS="-I /opt/fdo/include $DEPS_CFLAGS"
205AC_SUBST(DEPS_CFLAGS)
206
207PKG_CHECK_MODULES(TEST, [
208        libspi-1.0              >= 1.5.0
209        libbonobo-2.0           >= 1.107.0
210        ORBit-2.0               >= 2.3.100
211        glib-2.0                >= 1.3.11
212        gtk+-2.0                >= 2.1.0
213        gdk-pixbuf-2.0          >= 2.1.0
214        gdk-pixbuf-xlib-2.0     >= 2.1.0
215])
216AC_SUBST(TEST_LIBS)
217AC_SUBST(TEST_CFLAGS)
218
219old_LIBS="$LIBS"
220dnl Checks for inet libraries:
221AC_SEARCH_LIBS(gethostent, nsl)
222AC_SEARCH_LIBS(setsockopt, socket)
223AC_SEARCH_LIBS(connect, inet)
224
225INET_LIBS="$LIBS"
226AC_SUBST(INET_LIBS)
227
228LIBS="$old_LIBS"
229
230
231dnl orbit-idl.
232ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
233AC_SUBST(ORBIT_IDL)
234
235dnl Bonobo and Bonobo-Activation idl files
236BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
237LIBBONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
238AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
239AC_SUBST(LIBBONOBO_IDL_DIR)
240
241AC_CHECK_LIB(popt, poptGetContext, [POPT_LIBS="-lpopt"],
242AC_MSG_ERROR([popt is required to build gnome-mag.
243You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
244AC_SUBST(POPT_LIBS)
245AC_MSG_CHECKING([for POPT_ARG_FLOAT in popt.h])
246AC_TRY_CPP([#include <popt.h>
247#ifndef POPT_ARG_FLOAT
248#error popt too old
249#endif], AC_MSG_RESULT(yes), [
250  AC_MSG_RESULT(no)
251  AC_MSG_ERROR([A newer version of popt is required to build gnome-mag.
252You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])
253])
254
255
256AC_OUTPUT([
257Makefile
258gnome-mag-1.0.pc
259po/Makefile.in
260idl/Makefile
261magnifier/Makefile
262cursors/Makefile
263cursors/1_32/Makefile
264test/Makefile
265])
Note: See TracBrowser for help on using the repository browser.