e18d40b7b7e41595fb865945b1033d14094efb9b
[ntfsprogs-gnomevfs.git] / configure.ac
1 # $Id$
2 # Source file to generate "./configure" to prepare package for compilation
3 # Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 AC_INIT(src/libntfs.conf.in)
20 AM_INIT_AUTOMAKE(ntfsprogs-gnomevfs,1.0cvs)
21 AM_CONFIG_HEADER(config.h)
22 AM_MAINTAINER_MODE
23 AM_ENABLE_SHARED
24 AM_DISABLE_STATIC
25 AM_PROG_LIBTOOL
26
27 dnl Do not discard 'CFLAGS' settings as they may have been passed us by rpmbuild(8)
28
29 dnl Define MAINTAINER_MODE in config.h.
30 if test "$USE_MAINTAINER_MODE" = "yes";then
31         CFLAGS="$CFLAGS -ggdb3 -Wall -Wstrict-prototypes -Wsign-compare"  ## FIXME: fix all sources: -Wsign-compare
32         fi
33
34
35 AM_PATH_GLIB_2_0(,,[AC_MSG_ERROR([Captive requires glib-2.0 library.])],[gmodule gobject])
36 dnl Force glib-2.0 for the whole package
37 CFLAGS="$CFLAGS $GLIB_CFLAGS"
38 LIBS="$LIBS $GLIB_LIBS"
39
40 PKG_CHECK_MODULES(GNOME_VFS_MODULE,gnome-vfs-module-2.0)
41 dnl Force gnome-vfs-module-2.0 for the whole package
42 CFLAGS="$CFLAGS $GNOME_VFS_MODULE_CFLAGS"
43 LIBS="$LIBS $GNOME_VFS_MODULE_LIBS"
44
45 AC_CHECK_LIB(ntfs,ntfs_mount,
46         [ LIBS="$LIBS -lntfs" ],
47         [ AC_MSG_ERROR([ntfsprogs-devel package requires for this program.]) ])
48
49
50 AC_SUBST(CFLAGS)
51 AC_SUBST(LIBS)
52
53 dnl "Makefile" output files MUST have pathnames incl./excl. "./" prefix as specified!
54 AC_OUTPUT([
55 ntfsprogs-gnomevfs.spec
56 ./src/libntfs.conf
57 Makefile
58 ./macros/Makefile
59 ./src/Makefile
60 ])
61
62 echo done.