]> granicus.if.org Git - check/commitdiff
Made building docs conditional on presence of lyx and sgml2html
authoramalec <amalec@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Fri, 1 Jun 2001 15:33:42 +0000 (15:33 +0000)
committeramalec <amalec@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Fri, 1 Jun 2001 15:33:42 +0000 (15:33 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@20 64e312b2-a51f-0410-8e61-82d0ca0eb02a

check/aclocal.m4
check/configure
check/configure.in
check/doc/Makefile.am
check/doc/example.lyx

index 85b52e9f8997b20c0f9bf6f1f06e7c7d10dced7b..cf8646d3ab06b3e76e37f9e6f6934e07a67622c8 100644 (file)
@@ -103,6 +103,19 @@ else
 fi
 AC_SUBST($1)])
 
+# Define a conditional.
+
+AC_DEFUN(AM_CONDITIONAL,
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi])
+
 # Like AC_CONFIG_HEADER, but automatically create stamp file.
 
 AC_DEFUN(AM_CONFIG_HEADER,
index 04343647c94d8efd820266f09b7d52d95f5b5bd7..24494004869a8a2fbb53c48daeb8174028c48f17 100755 (executable)
@@ -691,7 +691,7 @@ fi
 
 PACKAGE=check
 
-VERSION=0.4
+VERSION=0.5.1
 
 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
@@ -1145,10 +1145,82 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+# Extract the first word of "lyx", so it can be a program name with args.
+set dummy lyx; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1152: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_have_lyx'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$have_lyx"; then
+  ac_cv_prog_have_lyx="$have_lyx" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_have_lyx="yes"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+have_lyx="$ac_cv_prog_have_lyx"
+if test -n "$have_lyx"; then
+  echo "$ac_t""$have_lyx" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test x"$have_lyx" != "xyes" ; then
+       echo "configure: warning: couldn't find lyx, not building docs" 1>&2
+fi
+# Extract the first word of "sgml2html", so it can be a program name with args.
+set dummy sgml2html; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1184: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_have_sgmltools'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$have_sgmltools"; then
+  ac_cv_prog_have_sgmltools="$have_sgmltools" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_have_sgmltools="yes"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+have_sgmltools="$ac_cv_prog_have_sgmltools"
+if test -n "$have_sgmltools"; then
+  echo "$ac_t""$have_sgmltools" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test x"$have_sgmltools" != "xyes" ; then
+       echo "configure: warning: couldn't find sgml2html, not building docs" 1>&2
+fi
 
 
+if test x"$have_lyx" = "xyes" -a x"$have_sgmltools" = "xyes" ; then
+  MAKE_DOC_TRUE=
+  MAKE_DOC_FALSE='#'
+else
+  MAKE_DOC_TRUE='#'
+  MAKE_DOC_FALSE=
+fi
+
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1152: checking how to run the C preprocessor" >&5
+echo "configure:1224: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1163,13 +1235,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1167 "configure"
+#line 1239 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1180,13 +1252,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1184 "configure"
+#line 1256 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1197,13 +1269,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1201 "configure"
+#line 1273 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1228,12 +1300,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1232: checking for ANSI C header files" >&5
+echo "configure:1304: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1237 "configure"
+#line 1309 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1241,7 +1313,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1258,7 +1330,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1262 "configure"
+#line 1334 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1276,7 +1348,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1280 "configure"
+#line 1352 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1297,7 +1369,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1301 "configure"
+#line 1373 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1308,7 +1380,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1332,12 +1404,12 @@ EOF
 fi
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1336: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1408: checking for sys/wait.h that is POSIX.1 compatible" >&5
 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1341 "configure"
+#line 1413 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -1353,7 +1425,7 @@ wait (&s);
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -1377,17 +1449,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1381: checking for $ac_hdr" >&5
+echo "configure:1453: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1386 "configure"
+#line 1458 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1418,12 +1490,12 @@ done
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1422: checking for working const" >&5
+echo "configure:1494: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1427 "configure"
+#line 1499 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1472,7 +1544,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1493,12 +1565,12 @@ EOF
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1497: checking for pid_t" >&5
+echo "configure:1569: checking for pid_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1502 "configure"
+#line 1574 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1526,12 +1598,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1530: checking for size_t" >&5
+echo "configure:1602: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1535 "configure"
+#line 1607 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1560,12 +1632,12 @@ fi
 
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:1564: checking for vprintf" >&5
+echo "configure:1636: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1569 "configure"
+#line 1641 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -1588,7 +1660,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -1612,12 +1684,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:1616: checking for _doprnt" >&5
+echo "configure:1688: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1693 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -1640,7 +1712,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -1667,12 +1739,12 @@ fi
 for ac_func in strerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1671: checking for $ac_func" >&5
+echo "configure:1743: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1676 "configure"
+#line 1748 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1695,7 +1767,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1871,6 +1943,10 @@ s%@AWK@%$AWK%g
 s%@CC@%$CC%g
 s%@LN_S@%$LN_S%g
 s%@RANLIB@%$RANLIB%g
+s%@have_lyx@%$have_lyx%g
+s%@have_sgmltools@%$have_sgmltools%g
+s%@MAKE_DOC_TRUE@%$MAKE_DOC_TRUE%g
+s%@MAKE_DOC_FALSE@%$MAKE_DOC_FALSE%g
 s%@CPP@%$CPP%g
 
 CEOF
index 2d30cf8ff48623b6a0652d3a5d78cf5e255ba2a7..39a96238b8c3d3caad8da26161f30c0f512c22f5 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(src/check.c)
-AM_INIT_AUTOMAKE(check,0.5)
+AM_INIT_AUTOMAKE(check,0.5.1)
 
 dnl Checks for programs.
 AC_PROG_AWK
@@ -8,7 +8,15 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_RANLIB
-
+AC_CHECK_PROG(have_lyx,lyx,yes)
+if test x"$have_lyx" != "xyes" ; then
+       AC_MSG_WARN([couldn't find lyx, not building docs])
+fi
+AC_CHECK_PROG(have_sgmltools,sgml2html,yes)
+if test x"$have_sgmltools" != "xyes" ; then
+       AC_MSG_WARN([couldn't find sgml2html, not building docs])
+fi
+AM_CONDITIONAL(MAKE_DOC, test x"$have_lyx" = "xyes" -a x"$have_sgmltools" = "xyes" )
 dnl Checks for libraries.
 
 dnl Checks for header files.
index 14c46c30834c498eaa76c7427ce731e850d128f8..e037725d403f0ff15e6dfd587050dcc4ce34d97e 100644 (file)
@@ -43,6 +43,10 @@ EXTRA_DIST = $(lyx_docs) $(example_docs)
 
 afake_DATA =
 
+if MAKE_DOC
 doc_DATA = $(lyx_docs) $(sgml_docs) $(html_docs) $(example_docs)
+else
+doc_DATA = $(lyx_docs) $(example_docs)
+endif
 
 CLEANFILES = $(sgml_docs) $(html_docs) *.*~
\ No newline at end of file
index bd7464c83028c0099acaa1923d1001fa653894ff..2d5bd9c36aa0f05bb71b8f7c95528bb9c1450487 100644 (file)
@@ -117,7 +117,7 @@ ation, and having the unit tests reassure you at each step of that change
 \layout Standard
 
 Look at the Check homepage for the latest information on Check: 
-\begin_inset LatexCommand \htmlurl[check.sourceforge.net]{check.sourceforge.net}
+\begin_inset LatexCommand \htmlurl[http://check.sourceforge.net]{http://check.sourceforge.net}
 
 \end_inset