1 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(config.h)
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"
41 if test ! -d kernel/$OS_DIR
43 AC_MSG_ERROR($OS_DIR - not supported!)
45 AC_MSG_RESULT($OS_DIR)
51 [ --enable-debug enable debug messages to stdout (default=no)],
52 [ 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"],
53 [ CXXFLAGS="-O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" && CFLAGS="-O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"])
57 [ --enable-kdebug enable kernel module debug messages (default=no)],
58 [ KDEBUG_FLAGS="-DLUFS_DEBUG -DLUFS_VERBOSE" ], )
59 AC_SUBST(KDEBUG_FLAGS)
61 AC_ARG_ENABLE(autofs-install,
62 [ --enable-autofs-install enable installing of autofs configuration (default=no)],
63 [ AUTOFS_INSTALL="yes"],)
64 AC_SUBST(AUTOFS_INSTALL)
67 [ --enable-suid make lufsmnt suid root (default=yes)],
68 [ if test $enableval = "no"; then LUFS_SUID=""; else LUFS_SUID="true"; fi ] , LUFS_SUID="true" )
73 AC_MSG_CHECKING(for ssh)
75 [ --with-ssh=PATH specify the path to the ssh executable],
77 if test "$CXX" = "false"
79 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of sshfs.])
82 if test ! -x "$SSHPROG"
84 AC_MSG_ERROR([Specified --with-ssh $SSHPROG is not executable.])
87 if test "$CXX" = "false"
91 if which ssh 2>/dev/null
99 if test "$SSHPROG" = "no"
101 AC_MSG_RESULT([not found (sshfs support disabled)])
103 AC_MSG_RESULT([found ($SSHPROG)])
104 AC_DEFINE([HAS_SSH], 1 , [Define if ssh is found.])
105 opt_fs="$opt_fs sshfs"
111 if test "$CXX" != "false"
113 AC_CHECK_PROG(GCONF, gnome-config, gnome-config)
114 AC_CHECK_PROG(GVFSCONF, gnome-vfs-config, gnome-vfs-config)
115 AC_CHECK_LIB(gnomevfs, gnome_vfs_init, HAS_GNOMEVFS=1,)
116 if test "$GCONF" -a "$GVFSCONF" -a "$HAS_GNOMEVFS"
118 AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.])
120 GVFS_LDADD="`$GCONF --libs gnome` `$GVFSCONF --libs`"
121 GVFS_CFLAGS="`$GCONF --cflags gnome` `$GVFSCONF --cflags`"
122 opt_fs="$opt_fs gvfs"
126 AC_SUBST(GVFS_CFLAGS)
129 [ --enable-wavfs build wavfs support (default=no)],
131 if test "$CXX" = "false"
133 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of wavfs.])
135 opt_fs="$opt_fs wavfs"
140 [ --enable-cefs build cefs support (default=no)],
142 if test "$CXX" = "false"
144 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cefs.])
146 opt_fs="$opt_fs cefs"
149 if test -n "$cefs_dir"; then
150 AC_DEFINE([HAS_CEFS], 1, [Define if cefs is to be built.])
151 AC_DEFINE([INFOFILE], ["/tmp/cedevices"], [Path to the information file for the RAPI library])
154 AC_ARG_ENABLE(cardfs,
155 [ --enable-cardfs build cardfs support (default=no)],
156 [ WITH_CARDFS=true ],)
158 dnl Checks for libraries.
159 AC_CHECK_LIB(pthread, pthread_detach,,AC_MSG_ERROR(libpthread is needed by lufs))
162 dnl Checks for header files.
164 AC_CHECK_HEADERS(unistd.h)
167 dnl This will test for endian-swapping headers
168 AC_CHECK_HEADERS(byteswap.h sys/byteswap.h endian.h machine/endian.h sys/types.h)
171 dnl Checks for typedefs, structures, and compiler characteristics.
175 dnl Checks for library functions.
176 AC_CHECK_FUNCS(mkdir rmdir)
178 if test -n "$WITH_CARDFS"; then
179 echo checking for cardfs
180 if test "$CXX" = "false"
182 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cardfs.])
184 AC_MSG_CHECKING(for libchipcard)
185 AC_ARG_WITH(chipcard-dir,
186 [ --with-chipcard-dir=DIR uses libchipcard from given dir],
188 [cc_dir="/usr/local/libchipcard \
193 for li in $cc_dir; do
194 if test -x "$li/bin/libchipcard-config"; then
198 if test -z "$chipcard_dir"; then
199 AC_MSG_RESULT([not found (chipcard support disabled)])
201 all_libraries="$all_libraries `$chipcard_dir/bin/libchipcard-config --libraries`"
202 all_includes="$all_includes `$chipcard_dir/bin/libchipcard-config --includes`"
203 AC_DEFINE([HAS_LIBCHIPCARD], 1, [Define if libchipcard is present.])
204 define_has_libchipcard="#define HAS_LIBCHIPCARD"
205 AC_SUBST(define_has_libchipcard)
206 LIBCHIPCARD_LIB="`$chipcard_dir/bin/libchipcard-config --libraries` -lcardfs"
207 LIBCHIPCARD_INCLUDES="`$chipcard_dir/bin/libchipcard-config --includes`"
208 AC_MSG_RESULT($chipcard_dir)
209 all_libraries="$all_libraries $libchipcard_libs"
210 all_includes="$all_includes $libchipcard_includes"
211 opt_fs="$opt_fs cardfs"
214 AC_SUBST(LIBCHIPCARD_LIB)
215 AC_SUBST(LIBCHIPCARD_INCLUDES)
217 all_includes="$all_includes -I`pwd`/include"
220 AC_SUBST(all_includes)
221 AC_SUBST(all_libraries)
227 filesystems/Makefile \
228 filesystems/localfs/Makefile \
229 filesystems/locasefs/Makefile \
230 filesystems/sshfs/Makefile \
231 filesystems/ftpfs/Makefile \
232 filesystems/cardfs/Makefile \
233 filesystems/cefs/Makefile \
234 filesystems/cefs/asyncd/Makefile \
235 filesystems/gvfs/Makefile \
236 filesystems/gnetfs/Makefile \
237 filesystems/wavfs/Makefile \
240 kernel/Linux/Makefile \
241 kernel/Linux/2.4/Makefile \
242 kernel/Linux/2.6/Makefile \
243 kernel/Linux/modbin/Makefile \
248 kernel/Linux/prepmod \
250 kernel/Linux/2.4/makefile \
251 kernel/Linux/2.6/makefile \
254 echo "###############################################################################"
255 echo " supported filesystems: $opt_fs"
256 echo -n " suid files: "
257 if test $LUFS_SUID; then echo "lufsmnt."; else echo "none."; fi
258 echo "###############################################################################"