1 dnl Process this file with autoconf to produce a configure script.
4 AM_CONFIG_HEADER(config.h)
6 AM_INIT_AUTOMAKE(lufs,0.9.6)
8 dnl Some Makefiles use additional tests etc.
9 AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"])
12 opt_fs="localfs gnetfs"
14 dnl Checks for programs.
24 [ --with-cxx permit use of C++ compiler for additional filesystems],
27 opt_fs="$opt_fs locasefs ftpfs"
39 [ --enable-debug enable debug messages to stdout (default=no)],
40 [ 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"],
41 [ CXXFLAGS="-O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" && CFLAGS="-O2 -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"])
45 [ --enable-kdebug enable kernel module debug messages (default=no)],
46 [ KDEBUG_FLAGS="-DLUFS_DEBUG -DLUFS_VERBOSE" ], )
47 AC_SUBST(KDEBUG_FLAGS)
49 AC_ARG_ENABLE(autofs-install,
50 [ --enable-autofs-install enable installing of autofs configuration (default=no)],
51 [ AUTOFS_INSTALL="yes"],)
52 AC_SUBST(AUTOFS_INSTALL)
55 [ --enable-suid make lufsmnt and lufsumount suid root (default=yes)],
56 [ if test $enableval = "no"; then LUFS_SUID=""; else LUFS_SUID="true"; fi ] , LUFS_SUID="true" )
61 AC_MSG_CHECKING(for ssh)
63 [ --with-ssh=PATH specify the path to the ssh executable],
65 if test "$CXX" = "false"
67 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of sshfs.])
70 if test ! -x "$SSHPROG"
72 AC_MSG_ERROR([Specified --with-ssh $SSHPROG is not executable.])
75 if test "$CXX" = "false"
79 if which ssh 2>/dev/null
87 if test "$SSHPROG" = "no"
89 AC_MSG_RESULT([not found (sshfs support disabled)])
91 AC_MSG_RESULT([found ($SSHPROG)])
92 AC_DEFINE([HAS_SSH], 1 , [Define if ssh is found.])
93 opt_fs="$opt_fs sshfs"
99 if test "$CXX" != "false"
101 AC_CHECK_PROG(GCONF, gnome-config, gnome-config)
102 AC_CHECK_PROG(GVFSCONF, gnome-vfs-config, gnome-vfs-config)
103 AC_CHECK_LIB(gnomevfs, gnome_vfs_init, HAS_GNOMEVFS=1,)
104 if test "$GCONF" -a "$GVFSCONF" -a "$HAS_GNOMEVFS"
106 AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.])
108 GVFS_LDADD="`$GCONF --libs gnome` `$GVFSCONF --libs`"
109 GVFS_CFLAGS="`$GCONF --cflags gnome` `$GVFSCONF --cflags`"
110 opt_fs="$opt_fs gvfs"
114 AC_SUBST(GVFS_CFLAGS)
117 [ --enable-wavfs build wavfs support (default=no)],
119 if test "$CXX" = "false"
121 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of wavfs.])
123 opt_fs="$opt_fs wavfs"
128 [ --enable-cefs build cefs support (default=no)],
130 if test "$CXX" = "false"
132 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cefs.])
134 opt_fs="$opt_fs cefs"
137 if test -n "$cefs_dir"; then
138 AC_DEFINE([HAS_CEFS], 1, [Define if cefs is to be built.])
139 AC_DEFINE([INFOFILE], ["/tmp/cedevices"], [Path to the information file for the RAPI library])
142 AC_ARG_ENABLE(cardfs,
143 [ --enable-cardfs build cardfs support (default=no)],
144 [ WITH_CARDFS=true ],)
146 dnl Checks for libraries.
147 AC_CHECK_LIB(pthread, pthread_detach,,AC_MSG_ERROR(libpthread is needed by lufs))
150 dnl Checks for header files.
152 AC_CHECK_HEADERS(unistd.h)
155 dnl This will test for endian-swapping headers
156 AC_CHECK_HEADERS(byteswap.h sys/byteswap.h endian.h machine/endian.h sys/types.h)
159 dnl Checks for typedefs, structures, and compiler characteristics.
163 dnl Checks for library functions.
164 AC_CHECK_FUNCS(mkdir rmdir)
166 if test -n "$WITH_CARDFS"; then
167 echo checking for cardfs
168 if test "$CXX" = "false"
170 AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cardfs.])
172 AC_MSG_CHECKING(for libchipcard)
173 AC_ARG_WITH(chipcard-dir,
174 [ --with-chipcard-dir=DIR uses libchipcard from given dir],
176 [cc_dir="/usr/local/libchipcard \
181 for li in $cc_dir; do
182 if test -x "$li/bin/libchipcard-config"; then
186 if test -z "$chipcard_dir"; then
187 AC_MSG_RESULT([not found (chipcard support disabled)])
189 all_libraries="$all_libraries `$chipcard_dir/bin/libchipcard-config --libraries`"
190 all_includes="$all_includes `$chipcard_dir/bin/libchipcard-config --includes`"
191 AC_DEFINE([HAS_LIBCHIPCARD], 1, [Define if libchipcard is present.])
192 define_has_libchipcard="#define HAS_LIBCHIPCARD"
193 AC_SUBST(define_has_libchipcard)
194 LIBCHIPCARD_LIB="`$chipcard_dir/bin/libchipcard-config --libraries` -lcardfs"
195 LIBCHIPCARD_INCLUDES="`$chipcard_dir/bin/libchipcard-config --includes`"
196 AC_MSG_RESULT($chipcard_dir)
197 all_libraries="$all_libraries $libchipcard_libs"
198 all_includes="$all_includes $libchipcard_includes"
199 opt_fs="$opt_fs cardfs"
202 AC_SUBST(LIBCHIPCARD_LIB)
203 AC_SUBST(LIBCHIPCARD_INCLUDES)
205 all_includes="$all_includes -I`pwd`/include"
208 AC_SUBST(all_includes)
209 AC_SUBST(all_libraries)
215 filesystems/Makefile \
216 filesystems/localfs/Makefile \
217 filesystems/locasefs/Makefile \
218 filesystems/sshfs/Makefile \
219 filesystems/ftpfs/Makefile \
220 filesystems/cardfs/Makefile \
221 filesystems/cefs/Makefile \
222 filesystems/cefs/asyncd/Makefile \
223 filesystems/gvfs/Makefile \
224 filesystems/gnetfs/Makefile \
225 filesystems/wavfs/Makefile \
228 kernel/Linux/Makefile \
229 kernel/Linux/2.4/Makefile \
230 kernel/Linux/2.5/Makefile \
231 kernel/Linux/modbin/Makefile \
236 kernel/Linux/prepmod \
239 echo "###############################################################################"
240 echo " supported filesystems: $opt_fs"
241 echo -n " suid files: "
242 if test $LUFS_SUID; then echo "lufsmnt & lufsumount."; else echo "none."; fi
243 echo "###############################################################################"