1 AC_INIT(modules/http-method.c)
4 # LIBGNOMEVFS_MICRO_VERSION += 1;
5 # LIBGNOMEVFS_INTERFACE_AGE += 1;
6 # if any functions have been added, set LIBGNOMEVFS_INTERFACE_AGE to 0.
7 # if backwards compatibility has been broken,
8 # set LIBGNOMEVFS_BINARY_AGE and LIBGNOMEVFS_INTERFACE_AGE to 0.
10 LIBGNOMEVFS_MAJOR_VERSION=2
11 LIBGNOMEVFS_MINOR_VERSION=3
12 LIBGNOMEVFS_MICRO_VERSION=8
13 LIBGNOMEVFS_INTERFACE_AGE=8
14 # If you need a modifier for the version number.
15 # Normally empty, but can be used to make "fixup" releases.
16 LIBGNOMEVFS_EXTRAVERSION=
18 dnl libtool versioning from libgnome
20 LIBGNOMEVFS_CURRENT=`expr 100 '*' $LIBGNOMEVFS_MINOR_VERSION + $LIBGNOMEVFS_MICRO_VERSION - $LIBGNOMEVFS_INTERFACE_AGE`
21 LIBGNOMEVFS_BINARY_AGE=`expr 100 '*' $LIBGNOMEVFS_MINOR_VERSION + $LIBGNOMEVFS_MICRO_VERSION`
22 LIBGNOMEVFS_REVISION=$LIBGNOMEVFS_INTERFACE_AGE
23 LIBGNOMEVFS_AGE=`expr $LIBGNOMEVFS_BINARY_AGE - $LIBGNOMEVFS_INTERFACE_AGE`
24 LIBGNOMEVFS_VERSION=$LIBGNOMEVFS_MAJOR_VERSION.$LIBGNOMEVFS_MINOR_VERSION.$LIBGNOMEVFS_MICRO_VERSION$LIBGNOMEVFS_EXTRAVERSION
26 AC_SUBST(LIBGNOMEVFS_CURRENT)
27 AC_SUBST(LIBGNOMEVFS_REVISION)
28 AC_SUBST(LIBGNOMEVFS_AGE)
31 AM_CONFIG_HEADER(config.h)
32 AM_INIT_AUTOMAKE(gnome-vfs-httpcaptive, $LIBGNOMEVFS_VERSION)
34 dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
35 AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
40 dnl AC_CONFIG_SUBDIRS(gob)
49 dnl Versions shared with the .spec file.
50 BONOBO_ACTIVATION_REQUIRED=1.0.0
57 AC_SUBST(BONOBO_ACTIVATION_REQUIRED)
58 AC_SUBST(BONOBO_REQUIRED)
59 AC_SUBST(GCONF_REQUIRED)
60 AC_SUBST(GLIB_REQUIRED)
61 AC_SUBST(LIBIDL_REQUIRED)
62 AC_SUBST(ORBIT_REQUIRED)
63 AC_SUBST(XML_REQUIRED)
65 PKG_CHECK_MODULES(MODULES_XML, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED libxml-2.0 >= $XML_REQUIRED)
66 AC_SUBST(MODULES_XML_CFLAGS)
67 AC_SUBST(MODULES_XML_LIBS)
69 PKG_CHECK_MODULES(MODULES, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED)
70 AC_SUBST(MODULES_LIBS)
71 AC_SUBST(MODULES_CFLAGS)
73 PKG_CHECK_MODULES(MODULES_FILE, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED)
74 AC_SUBST(MODULES_FILE_LIBS)
75 AC_SUBST(MODULES_FILE_CFLAGS)
77 PKG_CHECK_MODULES(MODULES_GCONF, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED)
78 AC_SUBST(MODULES_GCONF_CFLAGS)
79 AC_SUBST(MODULES_GCONF_LIBS)
81 PKG_CHECK_MODULES(MODULES_XML_GCONF, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED libxml-2.0 >= $XML_REQUIRED gconf-2.0 >= $GCONF_REQUIRED)
82 AC_SUBST(MODULES_XML_GCONF_CFLAGS)
83 AC_SUBST(MODULES_XML_GCONF_LIBS)
85 PKG_CHECK_MODULES(MONIKERS, libbonobo-2.0 >= $BONOBO_REQUIRED)
86 AC_SUBST(MONIKERS_CFLAGS)
87 AC_SUBST(MONIKERS_LIBS)
89 PKG_CHECK_MODULES(TEST, bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED gconf-2.0 >= $GCONF_REQUIRED gthread-2.0 >= $GLIB_REQUIRED)
93 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
96 BONOBO_IDLDIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
97 AC_SUBST(BONOBO_IDLDIR)
100 VFS_CFLAGS="$warnCFLAGS $complCFLAGS"
102 dnl semaphore functions are in librt.so on solaris
103 AC_CHECK_LIB(rt, sem_wait)
105 AC_CACHE_CHECK([for off64_t],
108 # define _LARGEFILE64_SOURCE
109 # include <sys/types.h>],
110 [off64_t testoffset],
111 ac_cv_have_off64_t=yes,
112 ac_cv_have_off64_t=no))
113 if test x"$ac_cv_have_off64_t" = "xyes" ; then
114 AC_DEFINE(HAVE_OFF64_T)
117 AC_CHECK_LIB(nsl, t_accept)
118 AC_CHECK_LIB(socket, socket)
121 AC_CHECK_FUNCS(getdtablesize open64 lseek64 statvfs seteuid setegid setresuid setresgid readdir_r mbrtowc inet_pton getdelim)
123 dnl Specify the gconf configuration source,
124 dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
126 AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
128 if test x"$GCONFTOOL" = xno; then
129 AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
135 dnl This is so that we find the 64bit type
138 AC_CHECK_SIZEOF(long)
139 AC_CHECK_SIZEOF(long long)
141 VFS_SIZE="unsigned long"
143 VFS_SIZE_IS="UNSIGNED_LONG"
146 VFS_OFFSET_PRINTF="ld"
149 dnl See if any of the types is 64 bits, and in case it is, use it
150 dnl Note: We test an (int) even though I think using (long) would be fine.
151 dnl This is because glib does it this way for gint64 and so there
152 dnl is probably a reason behind it
156 VFS_SIZE="unsigned int"
158 VFS_SIZE_IS="UNSIGNED_INT"
161 VFS_OFFSET_PRINTF="d"
164 # Nothing happens here, we are already using a long
166 $ac_cv_sizeof_long_long)
167 VFS_SIZE="unsigned long long"
168 VFS_OFFSET="long long"
169 VFS_SIZE_IS="UNSIGNED_LONG_LONG"
170 VFS_OFFSET_IS="LONG_LONG"
172 VFS_OFFSET_PRINTF="Ld"
178 AC_SUBST(VFS_SIZE_IS)
179 AC_SUBST(VFS_OFFSET_IS)
180 AC_SUBST(VFS_SIZE_PRINTF)
181 AC_SUBST(VFS_OFFSET_PRINTF)
183 AC_CHECK_HEADERS(sys/param.h sys/resource.h sys/vfs.h sys/mount.h sys/statvfs.h wctype.h)
185 dnl ====================================
187 dnl = Profiling support
189 dnl ====================================
191 AC_ARG_ENABLE(profiler,
192 [ --enable-profiler Enable profiler],
194 AC_DEFINE(ENABLE_PROFILER))
196 if test "x$ENABLE_PROFILER" = "x1"
198 CFLAGS="-g -O -gdwarf-2 -finstrument-functions -D__NO_STRING_INLINES"
199 LDFLAGS="/gnome/PROFILE/lib/libprofiler.so -lpthread"
202 AC_SUBST(ENABLE_PROFILER)
203 AM_CONDITIONAL(ENABLE_PROFILER, test "x$ENABLE_PROFILER" = "x1")
204 dnl ====================================
206 dnl turn warnings into errors to enforce clean code for cvs users (not in tarball)
208 AC_ARG_ENABLE(more-warnings,
209 [ --enable-more-warnings Maximum compiler warnings],
210 set_more_warnings="$enableval",[
211 if test -f $srcdir/CVSVERSION; then
212 set_more_warnings=yes
218 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
219 echo "enable compile warnings = $set_more_warnings"
220 VFS_CFLAGS="-Wall -Werror \
221 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
222 -Wnested-externs -Wpointer-arith"
224 for option in -Wno-strict-aliasing -Wno-sign-compare; do
225 SAVE_CFLAGS="$CFLAGS"
226 CFLAGS="$VFS_CFLAGS $option $CFLAGS"
227 AC_MSG_CHECKING([whether gcc understands $option])
228 AC_TRY_COMPILE([], [],
231 CFLAGS="$SAVE_CFLAGS"
232 if test $has_option = yes; then
233 VFS_CFLAGS="$VFS_CFLAGS $option"
235 AC_MSG_RESULT($has_option)
244 dnl gnome vfs Documentation
246 GNOME_VFS_DIR=`(cd $srcdir; pwd)`
247 AC_SUBST(GNOME_VFS_DIR)
249 VFS_LIBS="-lgnomevfs $VFS_GLIB_LIBS"
250 VFS_LIBDIR='-L${libdir}'
251 VFS_INCLUDEDIR='-I${includedir} -I${libdir}/vfs/include'" $VFS_GLIB_CFLAGS"
253 AC_SUBST(VFS_INCLUDEDIR)
260 dnl if test "x$libefs_disabled" = xyes; then
263 dnl AC_PATH_PROG(LIBEFS_CONFIG, libefs-config, no)
266 dnl if test "x$LIBEFS_CONFIG" != xno; then
267 dnl LIBEFS_LIBS=`$LIBEFS_CONFIG --libs`
268 dnl LIBEFS_CFLAGS=`$LIBEFS_CONFIG --cflags`
272 AM_CONDITIONAL(HAVE_LIBEFS, false)
275 AC_SUBST(LIBEFS_LIBS)
276 AC_SUBST(LIBEFS_CFLAGS)
281 AC_DEFUN(AC_STRUCT_LINGER, [
283 AC_MSG_CHECKING(struct linger is available)
285 #include <sys/types.h>
286 #include <sys/socket.h>
297 AC_DEFINE(HAVE_STRUCT_LINGER)
304 AC_MSG_RESULT($av_struct_linger)
308 AC_CHECK_FUNCS(socket, have_socket=yes)
309 if test $have_socket = no; then
310 # socket is not in the default libraries. See if it's in some other.
311 for lib in bsd socket inet; do
312 AC_CHECK_LIB($lib, socket, [
315 AC_DEFINE(HAVE_SOCKET)
320 have_gethostbyname=no
321 AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
322 if test $have_gethostbyname = no; then
323 # gethostbyname is not in the default libraries. See if it's in some other.
324 for lib in bsd socket inet; do
325 AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
329 AC_CHECK_LIB(bz2, bzCompressInit, AC_DEFINE(HAVE_OLDER_BZIP2))
330 AC_CHECK_HEADERS(bzlib.h,
331 BZ2_LIBS="$BZ2_LIBS -lbz2",
332 AC_MSG_ERROR([Gnome-vfs requires libbz2 to compile.])
336 if test $have_socket = yes; then
340 dnl ******************************
342 dnl ******************************
344 AC_ARG_ENABLE(openssl, [ --disable-openssl build without openssl support])
345 if test "x$enable_openssl" != "xno"; then
346 PKG_CHECK_MODULES(OPENSSL, openssl, AM_CONDITIONAL(HAVE_SSL, true),[
347 AC_ARG_WITH(openssl-includes, [ --with-openssl-includes=PREFIX Location of OpenSSL includes.],
348 with_openssl_includes="$withval", with_openssl_includes="/usr/include")
349 have_openssl_includes="no"
350 if test "x${with_openssl_includes}" != "xno"; then
351 CPPFLAGS_save="$CPPFLAGS"
353 AC_MSG_CHECKING(for OpenSSL includes)
356 CPPFLAGS="$CPPFLAGS -I$with_openssl_includes"
357 AC_CHECK_HEADERS(openssl/ssl.h openssl/x509.h, [ openssl_includes="yes" ])
358 CPPFLAGS="$CPPFLAGS_save"
360 if test "x{$openssl_includes}" != "xno" -a "x{$openssl_includes}" != "x"; then
361 have_openssl_includes="yes"
362 if test "${with_openssl_includes}" != "/usr/include" ; then
363 OPENSSL_CFLAGS="-I$with_openssl_includes"
371 AC_MSG_CHECKING(for OpenSSL includes)
375 AC_ARG_WITH(openssl-libs, [ --with-openssl-libs=PREFIX Location of OpenSSL libs.],
376 with_openssl_libs="$withval", with_openssl_libs="/usr/lib")
378 if test "x${with_openssl_libs}" != "xno" -a "x${have_openssl_includes}" != "xno"; then
379 LDFLAGS_save="$LDFLAGS"
381 AC_CACHE_CHECK([for OpenSSL libraries], openssl_libs,
383 dnl How can we test to see if we need to link to libld for sure??
384 dnl RedHat 6.2 seems to need to but Debian Woody doesn't
385 LDFLAGS="$LDFLAGS -L$with_openssl_libs -lssl -lcrypto -ldl"
386 AC_TRY_LINK_FUNC(SSL_read, openssl_libs="yes", openssl_libs="no")
387 LDFLAGS="$LDFLAGS_save"
389 if test "x${openssl_libs}" != "xno"; then
390 AC_DEFINE(HAVE_OPENSSL)
392 if test x$with_openssl_libs != x/usr/lib; then
393 OPENSSL_LIBS="-L$with_openssl_libs -lssl -lcrypto"
395 OPENSSL_LIBS="-lssl -lcrypto"
397 AM_CONDITIONAL(HAVE_SSL, true)
401 AM_CONDITIONAL(HAVE_SSL, false)
404 AC_MSG_CHECKING(for OpenSSL libraries)
408 dnl end of PKG_CHECK_MODULES(openssl)
412 dnl ****************************
414 dnl ****************************
416 dnl AC_ARG_ENABLE(gnutls, [ --enable-gnutls build with gnutls support])
417 dnl if test "x$enable_gnutls" = "xyes"; then
418 dnl if test "x${OPENSSL_LIBS}" != "x"; then
419 dnl AC_MSG_ERROR([*** Can't use both openssl and gnutls at the same time. Please pick one only. ***])
421 dnl AM_PATH_LIBGNUTLS(0.5.1, AC_DEFINE(HAVE_GNUTLS),
422 dnl AC_MSG_ERROR([Unable to find GNUTLS]))
426 PKG_CHECK_MODULES(LIBGNOMEVFS, glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED ORBit-2.0 >= $ORBIT_REQUIRED libxml-2.0 >= $XML_REQUIRED gnome-mime-data-2.0 gnome-vfs-module-2.0)
427 LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS"
428 LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS"
429 AC_SUBST(LIBGNOMEVFS_CFLAGS)
430 AC_SUBST(LIBGNOMEVFS_LIBS)
433 dnl **********************
434 dnl *** Checks for FAM ***
435 dnl **********************
437 FAM_MISSING_WARNING="Gnome-vfs depends on FAM to provide notification when files are altered (either through filesystem polling, or a kernel notification mechanism). If Gnome-vfs is built without FAM support, directories viewed with Nautilus or other applications will not remain in synch with the actual filesystem when they are altered by external processes. Particularly if you are a distributor please compile Nautilus with FAM support. FAM is available from http://oss.sgi.com/projects/fam/. A patch to add Linux Kernel 2.4 directory notify support to FAM (highly desirable) is available from http://people.redhat.com/alexl/files/"
439 AC_CHECK_LIB(fam, FAMOpen,
440 [AC_CHECK_HEADERS(fam.h,
443 AC_MSG_WARN(*** FAM support will not be built (header files not found) $FAM_MISSING_WARNING ***))],
444 AC_MSG_WARN(*** FAM support will not be built (FAM library not found) $FAM_MISSING_WARNING ***))
450 dnl borrowed from gnu findutils
451 dnl and relicensed as LGPL by the FSF
454 [ --with-afs support -fstype afs],
456 CPPFLAGS="$CPPFLAGS -I/usr/afsws/include"
457 LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"])
459 AC_MSG_CHECKING(how to get filesystem type)
461 # The order of these tests is important.
462 AC_TRY_CPP([#include <sys/statvfs.h>
463 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
464 if test $fstype = no; then
465 AC_TRY_CPP([#include <sys/statfs.h>
466 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
468 if test $fstype = no; then
469 AC_TRY_CPP([#include <sys/statfs.h>
470 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
472 if test $fstype = no; then
473 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
475 if test $fstype = no; then
476 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
478 if test $fstype = no; then
479 AC_TRY_CPP([#include <sys/mount.h>
480 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
482 AC_MSG_RESULT($fstype)
484 dnl Check for libpopt
486 AC_CHECK_LIB(popt, poptGetArg, POPT_LIBS=-lpopt,
487 [AC_CHECK_HEADER(popt.h, , AC_MSG_ERROR([[
488 *** Couldn't find popt. Please download and install from
489 *** ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ and try again.]]))])
498 dnl This is needed by `test/vfs-run.in'
500 AC_SUBST(TOP_BUILDDIR)
502 dnl ====================================================================
503 dnl Code for checking whether IPv6 is enabled on the system....
504 dnl ====================================================================
505 AC_MSG_CHECKING([whether to enable ipv6])
506 AC_ARG_ENABLE(ipv6, [ --enable-ipv6 enable IPv6 extensions], ,enable_ipv6=yes)
507 if test $enable_ipv6 = yes; then
510 dnl ====================================================================
511 dnl Code for checking presence of AF_INET6 on the system....
512 dnl ====================================================================
514 #include <sys/types.h>
515 #include <sys/socket.h>], [
516 socket(AF_INET6, SOCK_STREAM, 0)
521 AC_MSG_RESULT($have_ipv6)
523 dnl =================================================================
524 dnl Now we would check for specific functions like getaddrinfo.
525 dnl =================================================================
527 if test $have_ipv6 = yes; then
528 AC_CHECK_FUNC(getaddrinfo, have_getaddrinfo=yes)
529 if test $have_getaddrinfo != yes; then
530 # getaddrinfo is not in the default libraries. See if it's in some other.
531 for lib in bsd socket inet; do
532 AC_CHECK_LIB($lib, getaddrinfo, [LIBS="$LIBS -l$lib";have_getaddrinfo=yes; break])
535 if test $have_getaddrinfo = yes; then
536 AC_DEFINE(ENABLE_IPV6)
540 dnl ==============================================================================
541 dnl End of IPv6 checks
542 dnl ==============================================================================
547 gnome-vfs-httpcaptive.spec
552 dnl <= Configuration summary =>
554 echo "<= gnome-vfs configuration summary :"
555 dnl <= Profile support? =>
556 case "X$ENABLE_PROFILER" in
559 Enable profiler : YES"
563 Enable profiler : NO"
568 dnl <= CFLAGS and LDFLAGS =>