From: short <> Date: Tue, 19 Aug 2003 10:37:58 +0000 (+0000) Subject: Compilation of C++ modules conditioned by --with-cxx (disabled by default). X-Git-Tag: lufs_0_9_6_captive1~52 X-Git-Url: http://git.jankratochvil.net/?p=lufs.git;a=commitdiff_plain;h=ee575d26d47f72ce2b6762ec20b63c34d0560551 Compilation of C++ modules conditioned by --with-cxx (disabled by default). --- diff --git a/configure.in b/configure.in index 8a1c4d6..103f7bf 100644 --- a/configure.in +++ b/configure.in @@ -9,7 +9,27 @@ dnl Some Makefiles use additional tests etc. AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"]) dnl "static" FSs -opt_fs="localfs locasefs ftpfs gnetfs" +opt_fs="localfs gnetfs" + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_DISABLE_STATIC +AM_PROG_LIBTOOL +AC_PROG_MAKE_SET + +AC_ARG_WITH(cxx, + [ --with-cxx permit use of C++ compiler for additional filesystems], + [ + AC_PROG_CXX + opt_fs="$opt_fs locasefs ftpfs" + ], + [ + AC_PROG_CXX(true) + CXX=false + ]) AC_ARG_ENABLE(kernel-support, [ --enable-kernel-support enable building of the kernel module (default=yes)], @@ -114,25 +134,35 @@ AC_ARG_ENABLE(suid, [ if test $enableval = "no"; then LUFS_SUID=""; else LUFS_SUID="true"; fi ] , LUFS_SUID="true" ) AC_SUBST(LUFS_SUID) -AC_DISABLE_STATIC - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_INSTALL -AC_PROG_LN_S -AM_PROG_LIBTOOL -AC_PROG_MAKE_SET - dnl Checking ssh AC_MSG_CHECKING(for ssh) AC_ARG_WITH(ssh, [ --with-ssh=PATH specify the path to the ssh executable], - [SSHPROG=$withval], - [SSHPROG=`which ssh 2>/dev/null`]) -if test ! -x "$SSHPROG" + [ + if test "$CXX" = "false" + then + AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of sshfs.]) + fi + SSHPROG=$withval + if test ! -x "$SSHPROG" + then + AC_MSG_ERROR([Specified --with-ssh $SSHPROG is not executable.]) + fi + ],[ + if test "$CXX" = "false" + then + SSHPROG=no + else + if which ssh 2>/dev/null + then + SSHPROG=`which ssh` + else + SSHPROG=no + fi + fi + ]) +if test "$SSHPROG" = "no" then AC_MSG_RESULT([not found (sshfs support disabled)]) else @@ -144,28 +174,43 @@ AC_SUBST(SSHPROG) dnl Checking gnome -AC_CHECK_PROG(GCONF, gnome-config, gnome-config) -AC_CHECK_PROG(GVFSCONF, gnome-vfs-config, gnome-vfs-config) -AC_CHECK_LIB(gnomevfs, gnome_vfs_init, HAS_GNOMEVFS=1,) -if test "$GCONF" -a "$GVFSCONF" -a "$HAS_GNOMEVFS" +if test "$CXX" != "false" then - AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.]) + AC_CHECK_PROG(GCONF, gnome-config, gnome-config) + AC_CHECK_PROG(GVFSCONF, gnome-vfs-config, gnome-vfs-config) + AC_CHECK_LIB(gnomevfs, gnome_vfs_init, HAS_GNOMEVFS=1,) + if test "$GCONF" -a "$GVFSCONF" -a "$HAS_GNOMEVFS" + then + AC_DEFINE([HAS_GVFS], 1, [Define if gvfs is to be built.]) - GVFS_LDADD="`$GCONF --libs gnome` `$GVFSCONF --libs`" - GVFS_CFLAGS="`$GCONF --cflags gnome` `$GVFSCONF --cflags`" - opt_fs="$opt_fs gvfs" + GVFS_LDADD="`$GCONF --libs gnome` `$GVFSCONF --libs`" + GVFS_CFLAGS="`$GCONF --cflags gnome` `$GVFSCONF --cflags`" + opt_fs="$opt_fs gvfs" + fi fi AC_SUBST(GVFS_LDADD) AC_SUBST(GVFS_CFLAGS) AC_ARG_ENABLE(wavfs, [ --enable-wavfs build wavfs support (default=no)], - [ opt_fs="$opt_fs wavfs"],) + [ + if test "$CXX" = "false" + then + AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of wavfs.]) + fi + opt_fs="$opt_fs wavfs" + ],) AC_ARG_ENABLE(cefs, [ --enable-cefs build cefs support (default=no)], - [ opt_fs="$opt_fs cefs"],) + [ + if test "$CXX" = "false" + then + AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cefs.]) + fi + opt_fs="$opt_fs cefs" + ],) if test -n "$cefs_dir"; then AC_DEFINE([HAS_CEFS], 1, [Define if cefs is to be built.]) @@ -198,6 +243,10 @@ AC_CHECK_FUNCS(mkdir rmdir) if test -n "$WITH_CARDFS"; then echo checking for cardfs + if test "$CXX" = "false" + then + AC_MSG_ERROR([Use --with-cxx to permit C++ compilation of cardfs.]) + fi AC_MSG_CHECKING(for libchipcard) AC_ARG_WITH(chipcard-dir, [ --with-chipcard-dir=DIR uses libchipcard from given dir], diff --git a/lufsd/Makefile.am b/lufsd/Makefile.am index bc207cd..87fa9d5 100644 --- a/lufsd/Makefile.am +++ b/lufsd/Makefile.am @@ -12,7 +12,8 @@ noinst_HEADERS=message.h fsctl.h filesystem.h dircache.h list.h lufsd_SOURCES=daemon.c message.c fsctl.c filesystem.c dircache.c options.c -lufsd_LDADD= -ldl -lstdc++ @GVFS_LDADD@ +lufsd_LDADD= -ldl @GVFS_LDADD@ +# Disabled by Captive: lufsd_LDADD+= -lstdc++ lufsd_LDFLAGS= -rdynamic -lpthread install-exec-hook: