source: trunk/third/nautilus/configure.in @ 18669

Revision 18669, 10.5 KB checked in by ghudson, 21 years ago (diff)
Merge with nautilus 2.2.0.2.
Line 
1AC_INIT(src)
2
3dnl ===========================================================================
4
5ART_REQUIRED=2.3.10
6BONOBO_ACTIVATION_REQUIRED=1.0.0
7BONOBO_REQUIRED=2.1.0
8BONOBO_UI_REQUIRED=2.0.0
9EEL_REQUIRED=2.2.0
10ESOUND_REQUIRED=0.2.27
11GLIB_REQUIRED=2
12GNOME_DESKTOP_REQUIRED=2.1.0
13GNOME_REQUIRED=2.1.1
14GNOME_UI_REQUIRED=2.1.1
15GNOME_VFS_REQUIRED=2.1.5
16ORBIT_REQUIRED=2.4.0
17PANGO_REQUIRED=1.1.2
18GTK_REQUIRED=2.1.1
19MEDUSA_REQUIRED=0.5.1
20RSVG_REQUIRED=2.0.1
21XML_REQUIRED=2.4.7
22
23AC_SUBST(EEL_REQUIRED)
24AC_SUBST(GNOME_VFS_REQUIRED)
25AC_SUBST(MEDUSA_REQUIRED)
26AC_SUBST(RSVG_REQUIRED)
27AC_SUBST(XML_REQUIRED)
28
29dnl ===========================================================================
30
31AM_INIT_AUTOMAKE(nautilus, 2.2.0.2)
32AM_CONFIG_HEADER(config.h)
33
34AM_SANITY_CHECK
35AM_MAINTAINER_MODE
36
37AC_C_BIGENDIAN
38AC_C_CONST
39AC_ISC_POSIX
40AC_PROG_CC
41AC_PROG_CPP
42AC_PROG_INSTALL
43AC_PROG_LN_S
44AC_PROG_MAKE_SET
45AM_DISABLE_STATIC
46AM_PROG_LIBTOOL
47
48PKG_CHECK_MODULES(ALL, \
49        esound >= $ESOUND_REQUIRED \
50        bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED \
51        eel-2.0 >= $EEL_REQUIRED \
52        glib-2.0 >= $GLIB_REQUIRED \
53        gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED \
54        gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED \
55        ORBit-2.0 >= $ORBIT_REQUIRED\
56        pango >= $PANGO_REQUIRED \
57        gtk+-2.0 >= $GTK_REQUIRED \
58        libart-2.0 >= $ART_REQUIRED \
59        libbonobo-2.0 >= $BONOBO_REQUIRED \
60        libbonoboui-2.0 >= $BONOBO_UI_REQUIRED \
61        libgnome-2.0 >= $GNOME_REQUIRED \
62        libgnomeui-2.0 >= $GNOME_UI_REQUIRED \
63        librsvg-2.0 >= $RSVG_REQUIRED \
64        libxml-2.0 >= $XML_REQUIRED)
65dnl ==========================================================================
66
67ALL_LINGUAS="am ar az be bg ca cs da de el en_GB es et eu fi fr ga gl he hi hu it ja ko lt lv mk mn ms nl nn no pl pt pt_BR ro ru sk sl sq sv ta tr uk vi zh_CN zh_TW"
68
69GETTEXT_PACKAGE=nautilus
70AC_SUBST(GETTEXT_PACKAGE)
71AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
72
73AM_GLIB_GNU_GETTEXT
74
75AC_PROG_INTLTOOL
76
77dnl ==========================================================================
78
79ENABLE_PROFILER=
80AC_ARG_ENABLE(profiler,
81[  --enable-profiler            Enable profiler],
82ENABLE_PROFILER=1
83AC_DEFINE(ENABLE_PROFILER))
84
85profiling_support=off
86if test "x$ENABLE_PROFILER" = "x1"
87then
88        CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES $CFLAGS"
89        LDFLAGS="/gnome/GNOME2/lib/libprofiler.so -lpthread $LDFLAGS"
90        profiling_support=on
91fi
92
93AC_SUBST(ENABLE_PROFILER)
94AM_CONDITIONAL(ENABLE_PROFILER, test "x$ENABLE_PROFILER" = "x1")
95
96dnl ==========================================================================
97
98AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
99
100dnl ==========================================================================
101
102ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
103AC_SUBST(ORBIT_IDL)
104
105dnl ==========================================================================
106
107AC_CHECK_FUNCS(setmntent endmntent hasmntopt getmntinfo)
108AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/vfstab.h sys/cdio.h sys/mount.h)
109
110dnl ==========================================================================
111
112AC_CHECK_FUNCS(setenv unsetenv putenv)
113
114dnl ==========================================================================
115
116dnl X
117
118x_libs="`$PKG_CONFIG --libs pangox`"
119case x_libs in
120  *-lX11*) pango_omitted_x_deps=no ;;
121  *)       pango_omitted_x_deps=yes ;;
122esac
123
124x_cflags="`$PKG_CONFIG --cflags pangox`"
125x_extra_libs=
126
127if test $pango_omitted_x_deps = yes ; then
128  AC_PATH_XTRA
129 
130  if test x$no_x = xyes ; then
131    AC_MSG_ERROR([X development libraries not found])
132  fi
133
134  x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
135fi 
136
137## Strip the .la files
138 
139x_libs_for_checks=$x_libs
140#for I in $x_libs ; do
141#  case $I in
142#    *.la) ;;
143#    *) x_libs_for_checks="$x_libs_for_checks $I" ;;
144#  esac
145#done
146
147AC_CHECK_LIB(X11, XOpenDisplay, :,
148        AC_MSG_ERROR([*** libX11 not found.  Check 'config.log' for more details.]),
149        $x_libs_for_checks)
150
151dnl ==========================================================================
152
153dnl cdda
154
155AM_CONDITIONAL(HAVE_CDDA, false)
156AC_CHECK_HEADERS(cdda_interface.h cdda_paranoia.h, [
157        CDDA_LIBS="-lcdda_paranoia -lcdda_interface"
158        AM_CONDITIONAL(HAVE_CDDA, true)
159        ])
160
161dnl ==========================================================================
162
163dnl jw (for doc build)
164
165AC_PATH_PROG(JW,jw,no)
166if test x$JW = xno; then
167  HAVE_JW="no"
168else
169  HAVE_JW="yes"
170fi
171AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
172AC_SUBST(HAVE_JW)
173
174dnl ==========================================================================
175
176dnl medusa checking
177
178AC_MSG_CHECKING(for Medusa)
179
180PKG_CHECK_MODULES(MEDUSA, medusa-2.0 >= $MEDUSA_REQUIRED, have_medusa=yes, have_medusa=no)
181if test "x$have_medusa" = "xyes"; then
182  AC_DEFINE(HAVE_MEDUSA,1)
183  EXTRA_CORE_MODULES="$EXTRA_CORE_MODULES medusa-2.0"
184fi
185
186dnl ==========================================================================
187
188dnl libjpeg
189
190  if test -z "$LIBJPEG"; then
191    AC_CHECK_LIB(jpeg, jpeg_start_decompress,
192      [AC_CHECK_HEADER(jpeglib.h,
193        jpeg_ok=yes,
194        jpeg_ok=no)],
195      AC_MSG_WARN(*** (jpeg library not found) ***), -lm)
196    if test "$jpeg_ok" = yes; then
197      JPEG='jpeg'; LIBJPEG='-ljpeg'
198      AC_DEFINE(HAVE_LIBJPEG)
199    else
200     AC_MSG_WARN(*** JPEG loader will not be built (jpeg header file not found) ***)
201    fi
202  fi
203
204AC_SUBST(LIBJPEG)
205
206dnl ==========================================================================
207
208dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.
209
210AC_ARG_ENABLE(more-warnings,
211[  --enable-more-warnings  Maximum compiler warnings],
212set_more_warnings="$enableval",[
213if test -f $srcdir/CVSVERSION; then
214        is_cvs_version=true
215        set_more_warnings=yes
216else
217        set_more_warnings=no
218fi
219])
220AC_MSG_CHECKING(for more warnings, including -Werror)
221if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
222        AC_MSG_RESULT(yes)
223        CFLAGS="\
224        -Wall \
225        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
226        -Wnested-externs -Wpointer-arith \
227        -Wcast-align -Wsign-compare \
228        -Werror \
229        $CFLAGS"
230
231        for option in -Wsign-promo -Wno-sign-compare; do
232                SAVE_CFLAGS="$CFLAGS"
233                CFLAGS="$option $CFLAGS"
234                AC_MSG_CHECKING([whether gcc understands $option])
235                AC_TRY_COMPILE([], [],
236                        has_option=yes,
237                        has_option=no,)
238                if test $has_option = no; then
239                        CFLAGS="$SAVE_CFLAGS"
240                fi
241                AC_MSG_RESULT($has_option)
242                unset has_option
243                unset SAVE_CFLAGS
244        done
245        unset option
246else
247        AC_MSG_RESULT(no)
248fi
249
250dnl ==========================================================================
251
252dnl gimphwrapbox
253GIMPHWRAPBOX_MODULES="gtk+-2.0"
254GIMPHWRAPBOX_CFLAGS="`$PKG_CONFIG --cflags $GIMPHWRAPBOX_MODULES`"
255AC_SUBST(GIMPHWRAPBOX_CFLAGS)
256
257dnl libegg
258LIBEGG_MODULES="gtk+-2.0 libgnome-2.0"
259LIBEGG_CFLAGS="`$PKG_CONFIG --cflags $LIBEGG_MODULES`"
260AC_SUBST(LIBEGG_CFLAGS)
261
262dnl libnautilus (must list bonobo-activation and libbonobo because idldir does not respect "requires")
263LIBNAUTILUS_MODULES="eel-2.0 bonobo-activation-2.0 libbonobo-2.0 libbonoboui-2.0"
264LIBNAUTILUS_CFLAGS="`$PKG_CONFIG --cflags $LIBNAUTILUS_MODULES`"
265AC_SUBST(LIBNAUTILUS_CFLAGS)
266LIBNAUTILUS_LIBS="`$PKG_CONFIG --libs $LIBNAUTILUS_MODULES`"
267AC_SUBST(LIBNAUTILUS_LIBS)
268LIBNAUTILUS_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $LIBNAUTILUS_MODULES | $srcdir/add-include-prefix`"
269AC_SUBST(LIBNAUTILUS_IDL_INCLUDES)
270
271dnl core nautilus (must list bonobo-activation and libbonobo because idldir does not respect "requires")
272CORE_MODULES="eel-2.0 librsvg-2.0 bonobo-activation-2.0 libbonobo-2.0 libbonoboui-2.0 esound gnome-desktop-2.0 $EXTRA_CORE_MODULES"
273CORE_CFLAGS="`$PKG_CONFIG --cflags $CORE_MODULES` $x_cflags"
274AC_SUBST(CORE_CFLAGS)
275CORE_LIBS="`$PKG_CONFIG --libs $CORE_MODULES` $CDDA_LIBS $LIBJPEG $x_libs"
276AC_SUBST(CORE_LIBS)
277CORE_IDL_INCLUDES="`$PKG_CONFIG --variable=idldir $CORE_MODULES | $srcdir/add-include-prefix`"
278AC_SUBST(CORE_IDL_INCLUDES)
279
280dnl typical components
281COMPONENT_MODULES="eel-2.0 libbonoboui-2.0 gnome-vfs-module-2.0 gnome-desktop-2.0"
282COMPONENT_CFLAGS="`$PKG_CONFIG --cflags $COMPONENT_MODULES`"
283AC_SUBST(COMPONENT_CFLAGS)
284COMPONENT_LIBS="`$PKG_CONFIG --libs $COMPONENT_MODULES`"
285AC_SUBST(COMPONENT_LIBS)
286
287dnl emblems component
288EMBLEM_COMPONENT_MODULES="$COMPONENT_MODULES librsvg-2.0"
289EMBLEM_COMPONENT_CFLAGS="`$PKG_CONFIG --cflags $EMBLEM_COMPONENT_MODULES`"
290AC_SUBST(EMBLEM_COMPONENT_CFLAGS)
291EMBLEM_COMPONENT_LIBS="`$PKG_CONFIG --libs $EMBLEM_COMPONENT_MODULES`"
292AC_SUBST(EMBLEM_COMPONENT_LIBS)
293
294DISABLE_DEPRECATED_CFLAGS=" \
295        -DG_DISABLE_DEPRECATED \
296        -DGDK_DISABLE_DEPRECATED \
297        -DGDK_PIXBUF_DISABLE_DEPRECATED \
298        -DGTK_DISABLE_DEPRECATED \
299        -DGNOME_DISABLE_DEPRECATED"
300
301dnl FIXME: put this back once the registration_id stuff is cleared up.
302dnl     -DBONOBO_DISABLE_DEPRECATED
303
304AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
305
306dnl
307dnl disable (broken) hardware view
308dnl
309hw_view=disabled
310AC_ARG_ENABLE(hardware,
311[  --enable-hardware            Enable (broken, Linux only) hardware view],
312hw_view=enabled)
313if test "x`(uname -s) 2>/dev/null`" != "xLinux"; then
314        hw_view=disabled
315fi
316AM_CONDITIONAL(ENABLE_HARDWARE_VIEW, test "$hw_view" = "enabled")
317
318
319dnl libbackground
320PKG_CHECK_MODULES(CAPPLET, "gtk+-2.0 gconf-2.0 libgnomeui-2.0 libbonoboui-2.0")
321dnl ==========================================================================
322
323dnl ==============================================
324dnl Special GConf section
325dnl ==============================================
326
327AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
328
329if test x"$GCONFTOOL" = xno; then
330  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
331fi
332
333AM_GCONF_SOURCE_2
334
335AC_OUTPUT([
336Makefile
337components/Makefile
338components/adapter/Makefile
339components/hardware/Makefile
340components/hardware/icons/Makefile
341components/history/Makefile
342components/notes/Makefile
343components/text/Makefile
344components/text/services/Makefile
345components/throbber/Makefile
346components/tree/Makefile
347components/emblem/Makefile
348components/image_properties/Makefile
349cut-n-paste-code/Makefile
350cut-n-paste-code/libegg/Makefile
351cut-n-paste-code/widgets/Makefile
352cut-n-paste-code/widgets/gimphwrapbox/Makefile
353data/Makefile
354data/patterns/Makefile
355docs/Makefile
356icons/Makefile
357icons/crux_eggplant/Makefile
358icons/crux_eggplant/throbber/Makefile
359icons/crux_teal/Makefile
360icons/crux_teal/throbber/Makefile
361icons/default/Makefile
362icons/gnome/Makefile
363icons/gnome/throbber/Makefile
364icons/sierra/Makefile
365icons/tahoe/Makefile
366icons/throbber/Makefile
367libbackground/Makefile
368libnautilus-adapter/Makefile
369libnautilus-private/Makefile
370libnautilus/Makefile
371libnautilus/libnautilus.pc
372nautilus.spec
373po/Makefile.in
374src/Makefile
375src/file-manager/Makefile
376test/Makefile
377])
378
379dnl ==========================================================================
380echo "
381nautilus-$VERSION:
382
383        prefix:                 ${prefix}
384        source code location:   ${srcdir}
385        compiler:               ${CC}
386
387        hardware view:          ${hw_view}
388        profiling support:      ${profiling_support}
389"
Note: See TracBrowser for help on using the repository browser.