FIxed '--enable-bundle' for the compilation of CVS checkout.
[udpgate.git] / configure.ac
index 9d3c40b..ff03b18 100644 (file)
@@ -58,12 +58,32 @@ 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)
 
 
 PERL=
 AC_PATH_PROGS(PERL,perl5 perl)
 AM_CONDITIONAL(HAVE_PERL,test -n "$PERL")
 
+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.])
+       if test -f src/bundle.c
+       then
+               if test -z "$PERL"
+               then
+                       AC_MSG_WARN([Perl not found (see above). The --enable-bundle files cannot be updated yourself.])
+               fi
+       else
+               if test -z "$PERL"
+               then
+                       AC_MSG_ERROR([Perl not found (see above). --enable-bundle is not possible as src/bundle.c is missing.])
+               fi
+       fi
+fi
+
 POD2MAN=
 AC_PATH_PROGS(POD2MAN,pod2man)
 AM_CONDITIONAL(HAVE_POD2MAN,[ test -n "$POD2MAN" ])
@@ -235,6 +255,7 @@ udpgate.spec
 ./macros/glade-w.sh
 Makefile
 ./macros/Makefile
+./init.d/Makefile
 ./src/Makefile
 ])