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.
RevLine 
[15546]1AC_INIT(src)
2
[18389]3dnl ===========================================================================
[15768]4
[18389]5ART_REQUIRED=2.3.10
6BONOBO_ACTIVATION_REQUIRED=1.0.0
[18669]7BONOBO_REQUIRED=2.1.0
[18389]8BONOBO_UI_REQUIRED=2.0.0
[18669]9EEL_REQUIRED=2.2.0
[18389]10ESOUND_REQUIRED=0.2.27
11GLIB_REQUIRED=2
[18669]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
[16899]19MEDUSA_REQUIRED=0.5.1
[18389]20RSVG_REQUIRED=2.0.1
21XML_REQUIRED=2.4.7
[15768]22
[16899]23AC_SUBST(EEL_REQUIRED)
24AC_SUBST(GNOME_VFS_REQUIRED)
25AC_SUBST(MEDUSA_REQUIRED)
[18389]26AC_SUBST(RSVG_REQUIRED)
27AC_SUBST(XML_REQUIRED)
[15768]28
29dnl ===========================================================================
30
[18669]31AM_INIT_AUTOMAKE(nautilus, 2.2.0.2)
[15546]32AM_CONFIG_HEADER(config.h)
33
[18389]34AM_SANITY_CHECK
[15546]35AM_MAINTAINER_MODE
36
[18389]37AC_C_BIGENDIAN
38AC_C_CONST
39AC_ISC_POSIX
[15546]40AC_PROG_CC
41AC_PROG_CPP
42AC_PROG_INSTALL
43AC_PROG_LN_S
44AC_PROG_MAKE_SET
[18389]45AM_DISABLE_STATIC
46AM_PROG_LIBTOOL
[15546]47
[18389]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 \
[18669]55        ORBit-2.0 >= $ORBIT_REQUIRED\
56        pango >= $PANGO_REQUIRED \
[18389]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
[18669]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"
[18389]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
[15546]79ENABLE_PROFILER=
80AC_ARG_ENABLE(profiler,
81[  --enable-profiler            Enable profiler],
82ENABLE_PROFILER=1
83AC_DEFINE(ENABLE_PROFILER))
84
[18389]85profiling_support=off
[15546]86if test "x$ENABLE_PROFILER" = "x1"
87then
[18389]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
[15546]91fi
92
93AC_SUBST(ENABLE_PROFILER)
94AM_CONDITIONAL(ENABLE_PROFILER, test "x$ENABLE_PROFILER" = "x1")
95
[18389]96dnl ==========================================================================
[15546]97
[18389]98AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
[15546]99
[18389]100dnl ==========================================================================
[15546]101
[18669]102ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
103AC_SUBST(ORBIT_IDL)
104
105dnl ==========================================================================
106
[18389]107AC_CHECK_FUNCS(setmntent endmntent hasmntopt getmntinfo)
108AC_CHECK_HEADERS(mntent.h sys/mnttab.h sys/vfstab.h sys/cdio.h sys/mount.h)
[15768]109
[18389]110dnl ==========================================================================
[15546]111
[18389]112AC_CHECK_FUNCS(setenv unsetenv putenv)
[15546]113
[18389]114dnl ==========================================================================
[15546]115
[18389]116dnl X
[15546]117
[18389]118x_libs="`$PKG_CONFIG --libs pangox`"
119case x_libs in
120  *-lX11*) pango_omitted_x_deps=no ;;
121  *)       pango_omitted_x_deps=yes ;;
122esac
[15546]123
[18389]124x_cflags="`$PKG_CONFIG --cflags pangox`"
125x_extra_libs=
[15546]126
[18389]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
[15546]133
[18389]134  x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
[15546]135fi 
136
[18389]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
[15546]146
[18389]147AC_CHECK_LIB(X11, XOpenDisplay, :,
148        AC_MSG_ERROR([*** libX11 not found.  Check 'config.log' for more details.]),
149        $x_libs_for_checks)
[15546]150
[18389]151dnl ==========================================================================
[15546]152
[18389]153dnl cdda
[15546]154
[18389]155AM_CONDITIONAL(HAVE_CDDA, false)
[16899]156AC_CHECK_HEADERS(cdda_interface.h cdda_paranoia.h, [
[18389]157        CDDA_LIBS="-lcdda_paranoia -lcdda_interface"
158        AM_CONDITIONAL(HAVE_CDDA, true)
[16899]159        ])
[15546]160
[18389]161dnl ==========================================================================
[15546]162
[18389]163dnl jw (for doc build)
[15546]164
[16899]165AC_PATH_PROG(JW,jw,no)
166if test x$JW = xno; then
167  HAVE_JW="no"
[15546]168else
[16899]169  HAVE_JW="yes"
[15546]170fi
[16899]171AM_CONDITIONAL(HAVE_JW, test "x$HAVE_JW" = "xyes")
172AC_SUBST(HAVE_JW)
[15546]173
[18389]174dnl ==========================================================================
[15546]175
[18389]176dnl medusa checking
[15546]177
178AC_MSG_CHECKING(for Medusa)
179
[18389]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
[15546]185
[18389]186dnl ==========================================================================
[15546]187
[18389]188dnl libjpeg
[15546]189
[16899]190  if test -z "$LIBJPEG"; then
191    AC_CHECK_LIB(jpeg, jpeg_start_decompress,
[18389]192      [AC_CHECK_HEADER(jpeglib.h,
[16899]193        jpeg_ok=yes,
[18389]194        jpeg_ok=no)],
[16899]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
[18389]206dnl ==========================================================================
[15546]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
[15768]214        is_cvs_version=true
[15546]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"
[16899]233                CFLAGS="$option $CFLAGS"
[15546]234                AC_MSG_CHECKING([whether gcc understands $option])
235                AC_TRY_COMPILE([], [],
236                        has_option=yes,
237                        has_option=no,)
[16899]238                if test $has_option = no; then
239                        CFLAGS="$SAVE_CFLAGS"
[15546]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
[18389]250dnl ==========================================================================
[15546]251
[18389]252dnl gimphwrapbox
253GIMPHWRAPBOX_MODULES="gtk+-2.0"
254GIMPHWRAPBOX_CFLAGS="`$PKG_CONFIG --cflags $GIMPHWRAPBOX_MODULES`"
255AC_SUBST(GIMPHWRAPBOX_CFLAGS)
[15768]256
[18669]257dnl libegg
258LIBEGG_MODULES="gtk+-2.0 libgnome-2.0"
259LIBEGG_CFLAGS="`$PKG_CONFIG --cflags $LIBEGG_MODULES`"
260AC_SUBST(LIBEGG_CFLAGS)
261
[18389]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)
[15768]270
[18389]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)
[15768]279
[18389]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)
[15768]286
[18669]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)
[18389]293
294DISABLE_DEPRECATED_CFLAGS=" \
295        -DG_DISABLE_DEPRECATED \
296        -DGDK_DISABLE_DEPRECATED \
297        -DGDK_PIXBUF_DISABLE_DEPRECATED \
298        -DGTK_DISABLE_DEPRECATED \
[18669]299        -DGNOME_DISABLE_DEPRECATED"
300
301dnl FIXME: put this back once the registration_id stuff is cleared up.
302dnl     -DBONOBO_DISABLE_DEPRECATED
303
[18389]304AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
305
[15546]306dnl
[18389]307dnl disable (broken) hardware view
[15546]308dnl
[18389]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
[15546]315fi
[18389]316AM_CONDITIONAL(ENABLE_HARDWARE_VIEW, test "$hw_view" = "enabled")
[15546]317
[16899]318
[18389]319dnl libbackground
320PKG_CHECK_MODULES(CAPPLET, "gtk+-2.0 gconf-2.0 libgnomeui-2.0 libbonoboui-2.0")
321dnl ==========================================================================
[16899]322
[18389]323dnl ==============================================
324dnl Special GConf section
325dnl ==============================================
[16899]326
[18389]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
[15546]335AC_OUTPUT([
336Makefile
[18389]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
[18669]347components/emblem/Makefile
348components/image_properties/Makefile
[18389]349cut-n-paste-code/Makefile
[18669]350cut-n-paste-code/libegg/Makefile
[18389]351cut-n-paste-code/widgets/Makefile
352cut-n-paste-code/widgets/gimphwrapbox/Makefile
353data/Makefile
354data/patterns/Makefile
355docs/Makefile
[15546]356icons/Makefile
357icons/crux_eggplant/Makefile
358icons/crux_eggplant/throbber/Makefile
[16899]359icons/crux_teal/Makefile
360icons/crux_teal/throbber/Makefile
[18389]361icons/default/Makefile
[15546]362icons/gnome/Makefile
[18389]363icons/gnome/throbber/Makefile
[16899]364icons/sierra/Makefile
365icons/tahoe/Makefile
[15546]366icons/throbber/Makefile
[18389]367libbackground/Makefile
[15546]368libnautilus-adapter/Makefile
[16899]369libnautilus-private/Makefile
[18389]370libnautilus/Makefile
371libnautilus/libnautilus.pc
372nautilus.spec
373po/Makefile.in
[15546]374src/Makefile
375src/file-manager/Makefile
376test/Makefile
377])
378
[18389]379dnl ==========================================================================
380echo "
381nautilus-$VERSION:
[15546]382
[18389]383        prefix:                 ${prefix}
384        source code location:   ${srcdir}
385        compiler:               ${CC}
[16899]386
[18389]387        hardware view:          ${hw_view}
388        profiling support:      ${profiling_support}
389"
Note: See TracBrowser for help on using the repository browser.