1 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(config.h)
7 VERSION_EXT=captive3cvs
10 AM_INIT_AUTOMAKE(lufs,$VERSION_BASE$VERSION_EXT)
12 dnl Some Makefiles use additional tests etc.
13 AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"])
16 opt_fs="localfs gnetfs"
18 dnl Checks for programs.
28 [ --with-cxx permit use of C++ compiler for additional filesystems],
31 opt_fs="$opt_fs locasefs ftpfs"
43 [ --enable-debug enable debug messages to stdout (default=no)],
44 [ DEBUG_FLAGS="-g -DDEBUG" && CXXFLAGS="-g -O2 -Wall -DDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" && CFLAGS="-g -O2 -Wall -DDEBUG -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"],
45 [ CXXFLAGS="-O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" && CFLAGS="-O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"])
49 [ --enable-kdebug enable kernel module debug messages (default=no)],
50 [ KDEBUG_FLAGS="-DLUFS_DEBUG -DLUFS_VERBOSE" ], )
51 AC_SUBST(KDEBUG_FLAGS)
53 AC_ARG_ENABLE(autofs-install,
54 [ --enable-autofs-install enable installing of autofs configuration (default=no)],
55 [ AUTOFS_INSTALL="yes"],)
56 AC_SUBST(AUTOFS_INSTALL)
59 [ --enable-suid make lufsmnt and lufsumount suid root (default=yes)],
60 [ if test $enableval = "no"; then LUFS_SUID=""; else LUFS_SUID="true"; fi ] , LUFS_SUID="true" )
65 AC_MSG_CHECKING(for ssh)
67 [ --with-ssh=PATH specify the path to the ssh executable],
69 if test "$CXX" = "false"
71 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of sshfs.])
74 if test ! -x "$SSHPROG"
76 AC_MSG_ERROR([Specified --with-ssh $SSHPROG is not executable.])
79 if test "$CXX" = "false"
83 if which ssh 2>/dev/null
91 if test "$SSHPROG" = "no"
93 AC_MSG_RESULT([not found (sshfs support disabled)])
95 AC_MSG_RESULT([found ($SSHPROG)])
96 AC_DEFINE([HAS_SSH], 1 , [Define if ssh is found.])
97 opt_fs="$opt_fs sshfs"
103 if test "$CXX" != "false"
105 AC_CHECK_PROG(GCONF, gnome-config, gnome-config)
106 AC_CHECK_PROG(GVFSCONF, gnome-vfs-config, gnome-vfs-config)
107 AC_CHECK_LIB(gnomevfs, gnome_vfs_init, HAS_GNOMEVFS=1,)
108 if test "$GCONF" -a "$GVFSCONF" -a "$HAS_GNOMEVFS"
110 AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.])
112 GVFS_LDADD="`$GCONF --libs gnome` `$GVFSCONF --libs`"
113 GVFS_CFLAGS="`$GCONF --cflags gnome` `$GVFSCONF --cflags`"
114 opt_fs="$opt_fs gvfs"
118 AC_SUBST(GVFS_CFLAGS)
121 [ --enable-wavfs build wavfs support (default=no)],
123 if test "$CXX" = "false"
125 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of wavfs.])
127 opt_fs="$opt_fs wavfs"
132 [ --enable-cefs build cefs support (default=no)],
134 if test "$CXX" = "false"
136 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cefs.])
138 opt_fs="$opt_fs cefs"
141 if test -n "$cefs_dir"; then
142 AC_DEFINE([HAS_CEFS], 1, [Define if cefs is to be built.])
143 AC_DEFINE([INFOFILE], ["/tmp/cedevices"], [Path to the information file for the RAPI library])
146 AC_ARG_ENABLE(cardfs,
147 [ --enable-cardfs build cardfs support (default=no)],
148 [ WITH_CARDFS=true ],)
150 dnl Checks for libraries.
151 AC_CHECK_LIB(pthread, pthread_detach,,AC_MSG_ERROR(libpthread is needed by lufs))
154 dnl Checks for header files.
156 AC_CHECK_HEADERS(unistd.h)
159 dnl This will test for endian-swapping headers
160 AC_CHECK_HEADERS(byteswap.h sys/byteswap.h endian.h machine/endian.h sys/types.h)
163 dnl Checks for typedefs, structures, and compiler characteristics.
167 dnl Checks for library functions.
168 AC_CHECK_FUNCS(mkdir rmdir)
170 if test -n "$WITH_CARDFS"; then
171 echo checking for cardfs
172 if test "$CXX" = "false"
174 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cardfs.])
176 AC_MSG_CHECKING(for libchipcard)
177 AC_ARG_WITH(chipcard-dir,
178 [ --with-chipcard-dir=DIR uses libchipcard from given dir],
180 [cc_dir="/usr/local/libchipcard \
185 for li in $cc_dir; do
186 if test -x "$li/bin/libchipcard-config"; then
190 if test -z "$chipcard_dir"; then
191 AC_MSG_RESULT([not found (chipcard support disabled)])
193 all_libraries="$all_libraries `$chipcard_dir/bin/libchipcard-config --libraries`"
194 all_includes="$all_includes `$chipcard_dir/bin/libchipcard-config --includes`"
195 AC_DEFINE([HAS_LIBCHIPCARD], 1, [Define if libchipcard is present.])
196 define_has_libchipcard="#define HAS_LIBCHIPCARD"
197 AC_SUBST(define_has_libchipcard)
198 LIBCHIPCARD_LIB="`$chipcard_dir/bin/libchipcard-config --libraries` -lcardfs"
199 LIBCHIPCARD_INCLUDES="`$chipcard_dir/bin/libchipcard-config --includes`"
200 AC_MSG_RESULT($chipcard_dir)
201 all_libraries="$all_libraries $libchipcard_libs"
202 all_includes="$all_includes $libchipcard_includes"
203 opt_fs="$opt_fs cardfs"
206 AC_SUBST(LIBCHIPCARD_LIB)
207 AC_SUBST(LIBCHIPCARD_INCLUDES)
209 all_includes="$all_includes -I`pwd`/include"
212 AC_SUBST(all_includes)
213 AC_SUBST(all_libraries)
219 filesystems/Makefile \
220 filesystems/localfs/Makefile \
221 filesystems/locasefs/Makefile \
222 filesystems/sshfs/Makefile \
223 filesystems/ftpfs/Makefile \
224 filesystems/cardfs/Makefile \
225 filesystems/cefs/Makefile \
226 filesystems/cefs/asyncd/Makefile \
227 filesystems/gvfs/Makefile \
228 filesystems/gnetfs/Makefile \
229 filesystems/wavfs/Makefile \
232 kernel/Linux/Makefile \
233 kernel/Linux/2.4/Makefile \
234 kernel/Linux/2.5/Makefile \
235 kernel/Linux/modbin/Makefile \
240 kernel/Linux/prepmod \
242 kernel/Linux/2.4/makefile \
243 kernel/Linux/2.5/makefile \
246 echo "###############################################################################"
247 echo " supported filesystems: $opt_fs"
248 echo -n " suid files: "
249 if test $LUFS_SUID; then echo "lufsmnt & lufsumount."; else echo "none."; fi
250 echo "###############################################################################"