+Option --enable-bundle for the fully static built single-file binary.
[udpgate.git] / configure.ac
index dd7caf8..ac82242 100644 (file)
@@ -58,10 +58,15 @@ AM_CONDITIONAL(MAINTAINER_MODE,[test "$USE_MAINTAINER_MODE" = "yes"])
 
 AC_ARG_ENABLE(man-pages,
                [  --enable-man-pages=no/yes/auto   pod2man(1) required for man pages (def.=yes)],,enable_man_pages=yes)
+AC_ARG_ENABLE(bundle,
+               [  --enable-bundle                  Build single binary containing locale and init.d files (def.=no)],,enable_bundle=no)
 
 
-dnl Permit 'if NEVER' for Makefile.am-s; symbol 'FALSE' forbidden by automake
-AM_CONDITIONAL(NEVER,false)
+AM_CONDITIONAL(ENABLE_BUNDLE,[ test "x$enable_bundle" = "xyes" ])
+if test "x$enable_bundle" = "xyes"
+then
+       AC_DEFINE(ENABLE_BUNDLE,,[Build single binary containing locale and init.d files.])
+fi
 
 PERL=
 AC_PATH_PROGS(PERL,perl5 perl)
@@ -167,6 +172,8 @@ AH_BOTTOM([
  *
  * @Returns: Formatted output string located in g_alloca() memory.
  */
+#include <glib/galloca.h>
+#include <glib/gutils.h>
 #define udpgate_printf_alloca(format,args...) ({ \
                gsize _udpgate_printf_alloca_size=udpgate_nv_printf_string_upper_bound((format) , ## args); \
                gchar *_udpgate_printf_alloca_r=g_alloca(_udpgate_printf_alloca_size); \
@@ -201,14 +208,19 @@ AC_CHECK_LIB(popt,poptParseArgvString,[POPT_LIBS="-lpopt"],[AC_MSG_ERROR([UDPGat
 AC_SUBST(POPT_LIBS)
 
 GLADE_W_INIT([
-       ./src/install/acquire/ui-gnome-interface.c
-       ./src/install/acquire/ui-gnome-interface.h
-       ./src/install/acquire/ui-gnome-callbacks.h
-       ./src/install/acquire/ui-gnome-support.c
-       ./src/install/acquire/ui-gnome-support.h
+       ./src/ui-gnome-interface.c
+       ./src/ui-gnome-interface.h
+       ./src/ui-gnome-callbacks.h
+       ./src/ui-gnome-support.c
+       ./src/ui-gnome-support.h
        ])
 AC_SUBST(GNOMEUI_CFLAGS)
 AC_SUBST(GNOMEUI_LIBS)
+if $have_gnome
+then
+       AC_DEFINE(HAVE_GNOME,,[Compile Gnome support.])
+fi
+AM_CONDITIONAL(HAVE_GNOME,[ $have_gnome ])
 AM_CONDITIONAL(HAVE_GLADE_WRITESOURCE,[ test "x$PATH_GLADE" != "x" ])
 dnl Do not: AM_CONDITIONAL(BUILD_GLADESRC,[ test "xyes" = "x$BUILD_GLADESRC" ])
 dnl as we do not need it as we are conditioned by ENABLE_INSTALL_PKG
@@ -231,6 +243,7 @@ udpgate.spec
 ./macros/glade-w.sh
 Makefile
 ./macros/Makefile
+./init.d/Makefile
 ./src/Makefile
 ])