GPL-2.0 requirement relaxed for GPL-2.0+ requirement.
[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; either version 2 of the License, or
8 # (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
19
20 AC_INIT(src/libntfs.conf.in)
21 AM_INIT_AUTOMAKE(ntfsprogs-gnomevfs,1.0.3cvs)
22 AM_CONFIG_HEADER(config.h)
23 AM_MAINTAINER_MODE
24 AM_ENABLE_SHARED
25 AM_DISABLE_STATIC
26 AM_PROG_LIBTOOL
27
28 dnl Do not discard 'CFLAGS' settings as they may have been passed us by rpmbuild(8)
29
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 ./debian/changelog
61 ])
62
63 echo done.