Author: cazfi
Date: Thu Aug 13 05:22:57 2015
New Revision: 29482

URL: http://svn.gna.org/viewcvs/freeciv?rev=29482&view=rev
Log:
Replaced configure option --with-freeciv-manual with --enable-freeciv-manual 
that can be used also
to control the kind of output freeciv-manual will produce.

See patch #6214

Modified:
    trunk/configure.ac
    trunk/tools/civmanual.c

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=29482&r1=29481&r2=29482&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Thu Aug 13 05:22:57 2015
@@ -827,11 +827,20 @@
 
 AM_CONDITIONAL([CLIENT], [test "x$client" = "xyes"])
 
-AC_ARG_WITH([freeciv-manual],
-  AS_HELP_STRING([--without-freeciv-manual], [do not build freeciv-manual]),
-  [fcmanual=${withval}], [fcmanual=yes])
-
-AM_CONDITIONAL([FCMANUAL], [test "x$fcmanual" = "xyes"])
+AC_ARG_ENABLE([freeciv-manual],
+  AS_HELP_STRING([--enable-freeciv-manual=no/yes/wiki/html], [build 
freeciv-manual [wiki]]),
+[case "${enableval}" in
+  yes|wiki) fcmanual=wiki ;;
+  no)       fcmanual=no ;;
+  html)     fcmanual=html ;;
+  *) AC_MSG_ERROR([bad value ${enableval} for --enable-freeciv-manual]) ;;
+esac], [fcmanual=wiki])
+
+AM_CONDITIONAL([FCMANUAL], [test "x$fcmanual" != "xno"])
+
+if test x$fcmanual = xhtml ; then
+  AC_DEFINE([MANUAL_USE_HTML], [1], [Build freeciv-manual with html 
formatting])
+fi
 
 dnl freeciv-modpack checks
 AC_ARG_ENABLE([fcmp],

Modified: trunk/tools/civmanual.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/civmanual.c?rev=29482&r1=29481&r2=29482&view=diff
==============================================================================
--- trunk/tools/civmanual.c     (original)
+++ trunk/tools/civmanual.c     Thu Aug 13 05:22:57 2015
@@ -82,7 +82,7 @@
 };
 
 /* This formats the manual for an HTML wiki. */
-#ifdef USE_HTML
+#ifdef MANUAL_USE_HTML
 #define HEADER "<html><head><link rel=\"stylesheet\" type=\"text/css\" "\
                "href=\"manual.css\"/><meta http-equiv=\"Content-Type\" "\
                "content=\"text/html; charset=UTF-8\"/></head><body>\n\n"
@@ -92,7 +92,7 @@
 #define IMAGE_END ".png\">"
 #define SEPARATOR " "
 #define TAIL "</body></html>"
-#else
+#else  /* MANUAL_USE_HTML */
 #define HEADER " "
 #define SECTION_BEGIN "==="
 #define SECTION_END "==="
@@ -100,7 +100,7 @@
 #define IMAGE_END ".png]]"
 #define SEPARATOR "----\n\n"
 #define TAIL " "
-#endif
+#endif /* MANUAL_USE_HTML */
 
 void insert_client_build_info(char *outbuf, size_t outlen);
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to