Integrate static packaing into the CVS HEAD; make it even default.
[captive.git] / configure.ac
index ab31a16..fb9b187 100644 (file)
@@ -79,6 +79,8 @@ AC_ARG_ENABLE(sbin-mountdir,
 AC_ARG_ENABLE(sbin-mount-fs,
                [  --enable-sbin-mount-fs=FS1:FS2   sbin-mount pre-installed symlinks (def.=ntfs:fastfat:cdfs:ext2fsd)],,
                [ enable_sbin_mount_fs="ntfs:fastfat:cdfs:ext2fsd" ])
+AC_ARG_WITH(initddir,
+               [  --with-initddir=DIR              directory for captive FUSE shutdown (def.=/etc/rc.d/init.d)],,with_initddir=/etc/rc.d/init.d)
 AC_ARG_ENABLE(sandbox-setuid,
                [  --enable-sandbox-setuid=USER     non-privileged user  for captive-sandbox-server (def.=captive)],
                [ CAPTIVE_SANDBOX_SETUID="$enableval" ],[ CAPTIVE_SANDBOX_SETUID="captive" ])
@@ -96,6 +98,10 @@ AC_ARG_ENABLE(fuse,
                [  --enable-fuse=no/yes/auto        compile FUSE filesystem module (def.=auto)],,enable_fuse=auto)
 AC_ARG_ENABLE(install-pkg,
                [  --enable-install-pkg=no/yes/auto compile installation utils (def.=auto)],,enable_install_pkg=auto)
+AC_ARG_ENABLE(standalone,
+               [  --enable-standalone=no/yes       provide initialization for static-build (def.=no)],,enable_standalone=no)
+AC_ARG_ENABLE(standalone-fonts,
+               [  --enable-standalone-fonts=DIR    provide bundled Gnome fonts in directory (def.=no)],,enable_standalone_fonts=no)
 
 
 # AC_ARG_ENABLE(sbin-mountdir,[--enable-sbin-mountdir=DIR],,[enable_sbin_mountdir="/sbin"])
@@ -371,6 +377,13 @@ FUSE_CFLAGS="$FUSE_CFLAGS -DFUSE_USE_VERSION=22"
 AC_SUBST(FUSE_CFLAGS)
 AC_SUBST(FUSE_LIBS)
 
+initddir=
+if test x$with_initddir != xno;then
+       initddir="$with_initddir"
+fi
+AM_CONDITIONAL(WITH_INITDDIR,[ test x$with_initddir != xno ])
+AC_SUBST(initddir)
+
 if test x$ENABLE_LUFS_TRUE = x -a x$ENABLE_FUSE_TRUE = x;then
        # mount.captive(8) file installation would conflict, that's all.
        AC_MSG_ERROR([Compilation of both FUSE and LUFS modules is currently not supported - use '--disable-lufs'.])
@@ -470,6 +483,24 @@ CFLAGS="$captive_save_CFLAGS"
 LIBS="$captive_save_LIBS"
 AC_SUBST(GNOME_VFS_READ_ENTIRE_FILE_O)
 
+if test x$enable_standalone = xyes;then
+       AC_DEFINE(ENABLE_STANDALONE,,[Provide initialization for static-build])
+fi
+
+fontsdir=
+if test x$enable_standalone_fonts != xno;then
+       AC_DEFINE_UNQUOTED(STANDALONE_FONTSDIR,"$enable_standalone_fonts",
+                       [Fonts installation directory for static-build])
+       fontsdir="$enable_standalone_fonts"
+fi
+AC_SUBST(fontsdir)
+AM_CONDITIONAL(ENABLE_STANDALONE_FONTS,[test "$enable_standalone_fonts" != "no"])
+dnl $have_gnome should be provided by: GLADE_W_INIT()
+if test x$have_gnome != xtrue -a x$have_gnome != xfalse;then
+       AC_MSG_ERROR([INTERNAL: [GLADE_W_INIT()] expected here])
+fi
+AM_CONDITIONAL(HAVE_GNOME,[test "$have_gnome" = "true"])
+
 AC_SUBST(CFLAGS)
 AC_SUBST(LIBS)
 
@@ -556,6 +587,8 @@ Makefile
 ./src/w32-mod/Makefile
 ./doc/Makefile
 ./doc/apiref/Makefile
+./fonts/Makefile
+./fonts/fonts.conf
 ])
 
 dnl FIXME: Why is "po/POTFILES" being substituted?