From ea7b67dcceec3f7f6a23426df0d3e610326f7866 Mon Sep 17 00:00:00 2001
From: wolf
Date: Fri, 3 Mar 2000 13:48:51 +0000
Subject: [PATCH] Configure for doc++, some other small changes.
git-svn-id: https://svn.dealii.org/trunk@2546 0785d39b-7218-0410-832d-ea1e28bc413d
---
deal.II/configure | 83 +++++++++++++++++++++----------
deal.II/configure.in | 55 +++++++++++++++++---
deal.II/doc/auto/Makefile.in | 18 ++++---
deal.II/doc/auto/kdoc/Makefile.in | 4 --
deal.II/doc/readme.html | 10 ++++
5 files changed, 127 insertions(+), 43 deletions(-)
diff --git a/deal.II/configure b/deal.II/configure
index 01a69e0e4a..e27784657f 100755
--- a/deal.II/configure
+++ b/deal.II/configure
@@ -21,6 +21,8 @@ ac_help="$ac_help
--enable-multigrid Include multigrid code in library"
ac_help="$ac_help
--with-kdoc=DIR use kdoc installed in DIR"
+ac_help="$ac_help
+ --with-docxx=PATH use the doc++ executable pointed to by PATH"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -530,10 +532,17 @@ DEAL2_DIR=`pwd`
+OS=`uname`
+
+
+
+
+
+
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:537: checking for $ac_word" >&5
+echo "configure:546: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -563,7 +572,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:567: checking for $ac_word" >&5
+echo "configure:576: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -614,7 +623,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:618: checking for $ac_word" >&5
+echo "configure:627: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -646,7 +655,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:659: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -657,12 +666,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 661 "configure"
+#line 670 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -688,12 +697,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:701: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:697: checking whether we are using GNU C" >&5
+echo "configure:706: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -702,7 +711,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -721,7 +730,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:725: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:734: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -760,7 +769,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:764: checking for $ac_word" >&5
+echo "configure:773: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -792,7 +801,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:796: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:805: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -803,12 +812,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 807 "configure"
+#line 816 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -834,12 +843,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:838: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:847: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:843: checking whether we are using GNU C++" >&5
+echo "configure:852: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -848,7 +857,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -867,7 +876,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:871: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:880: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -923,14 +932,10 @@ fi
-OS=`uname`
-
-
-
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:934: checking for $ac_word" >&5
+echo "configure:939: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -964,6 +969,8 @@ fi
+
+
# Check whether --enable-multithreading or --disable-multithreading was given.
if test "${enable_multithreading+set}" = set; then
enableval="$enable_multithreading"
@@ -985,7 +992,7 @@ fi
if test $withmultithreading != no ; then
echo $ac_n "checking for ACE""... $ac_c" 1>&6
-echo "configure:989: checking for ACE" >&5
+echo "configure:996: checking for ACE" >&5
if test -d $withmultithreading ; then
echo "$ac_t""found" 1>&6
else
@@ -1016,6 +1023,9 @@ else
fi
+
+
+
# Check whether --enable-multigrid or --disable-multigrid was given.
if test "${enable_multigrid+set}" = set; then
enableval="$enable_multigrid"
@@ -1035,6 +1045,8 @@ fi
+
+
# Check whether --with-kdoc or --without-kdoc was given.
if test "${with_kdoc+set}" = set; then
withval="$with_kdoc"
@@ -1043,6 +1055,8 @@ else
kdocdir=doc/auto/scripts/kdoc
fi
+echo $ac_n "checking for kdoc""... $ac_c" 1>&6
+echo "configure:1060: checking for kdoc" >&5
if test -r $kdocdir/kdoc ; then
echo "$ac_t""found" 1>&6
else
@@ -1059,6 +1073,24 @@ fi
+# Check whether --with-docxx or --without-docxx was given.
+if test "${with_docxx+set}" = set; then
+ withval="$with_docxx"
+ docxx=$withval
+else
+ docxx=`which doc++`
+fi
+
+echo $ac_n "checking for doc++""... $ac_c" 1>&6
+echo "configure:1086: checking for doc++" >&5
+if test -x $docxx ; then
+ echo "$ac_t""found" 1>&6
+else
+ echo "$ac_t""not found" 1>&6
+ docxx=
+fi
+
+
@@ -1188,10 +1220,10 @@ s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@DEAL2_DIR@%$DEAL2_DIR%g
+s%@OS@%$OS%g
s%@CC@%$CC%g
s%@CXX@%$CXX%g
s%@GXX_VERSION@%$GXX_VERSION%g
-s%@OS@%$OS%g
s%@PERL@%$PERL%g
s%@enablemultithreading@%$enablemultithreading%g
s%@withmultithreading@%$withmultithreading%g
@@ -1199,6 +1231,7 @@ s%@enableshared@%$enableshared%g
s%@enablemultigrid@%$enablemultigrid%g
s%@kdocdir@%$kdocdir%g
s%@kdocversion@%$kdocversion%g
+s%@docxx@%$docxx%g
s%@subdirs@%$subdirs%g
CEOF
diff --git a/deal.II/configure.in b/deal.II/configure.in
index 008b4aefff..8bd3e9a264 100644
--- a/deal.II/configure.in
+++ b/deal.II/configure.in
@@ -22,6 +22,17 @@ DEAL2_DIR=`pwd`
AC_SUBST(DEAL2_DIR)
+dnl Check for the operating system
+OS=`uname`
+AC_SUBST(OS)
+
+
+
+
+dnl -------------------------------------------------------------
+dnl Find external programs
+dnl -------------------------------------------------------------
+
dnl Find a C compiler, which is used when building
dnl shared libaries. This modifies the variable CC.
dnl In order to get the absolute path of the compiler, use the
@@ -58,15 +69,15 @@ AC_SUBST(GXX_VERSION)
-dnl Check for the operating system
-OS=`uname`
-AC_SUBST(OS)
-
-
dnl Find path to perl
AC_PATH_PROG(PERL, perl)
+
+dnl -------------------------------------------------------------
+dnl Multithreading
+dnl -------------------------------------------------------------
+
dnl Test whether multithreading support is requested. This
dnl does not tell deal.II to actually use it, but the
dnl compiler flags are set to allow for it,
@@ -113,6 +124,12 @@ else
fi
AC_SUBST(enableshared)
+
+
+dnl -------------------------------------------------------------
+dnl Multigrid
+dnl -------------------------------------------------------------
+
dnl Test if multigrid should be enabled
dnl default is no
AC_ARG_ENABLE(multigrid,
@@ -130,12 +147,18 @@ AC_SUBST(enablemultigrid)
+dnl -------------------------------------------------------------
+dnl Documentation tools
+dnl -------------------------------------------------------------
+
+
dnl Find the kdoc directory for documentation. The old one is in
dnl doc/auto/scripts, but you might want a newer version.
AC_ARG_WITH(kdoc,
[ --with-kdoc=DIR use kdoc installed in DIR],
kdocdir=$withval,
kdocdir=doc/auto/scripts/kdoc)
+AC_MSG_CHECKING(for kdoc)
if test -r $kdocdir/kdoc ; then
AC_MSG_RESULT(found)
else
@@ -152,18 +175,36 @@ AC_SUBST(kdocversion)
+dnl Find the doc++ program
+AC_ARG_WITH(docxx,
+[ --with-docxx=PATH use the doc++ executable pointed to by PATH],
+ docxx=$withval,
+ docxx=`which doc++`)
+AC_MSG_CHECKING(for doc++)
+if test -x $docxx ; then
+ AC_MSG_RESULT(found)
+else
+ AC_MSG_RESULT(not found)
+ docxx=
+fi
+AC_SUBST(docxx)
+
-dnl -----------------------------------------------
+dnl -------------------------------------------------------------
dnl Configure other packages
+dnl -------------------------------------------------------------
-dnl Configure the `tests' directory, if that is installed.
+dnl Configure the `tests' directory, if that is installed.
AC_CONFIG_SUBDIRS(tests)
+dnl -------------------------------------------------------------
+dnl Output results
+dnl -------------------------------------------------------------
dnl Write output to the global options file
AC_OUTPUT(common/Make.global_options doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile)
diff --git a/deal.II/doc/auto/Makefile.in b/deal.II/doc/auto/Makefile.in
index 5a4a2deea1..717b1a7d0b 100644
--- a/deal.II/doc/auto/Makefile.in
+++ b/deal.II/doc/auto/Makefile.in
@@ -3,6 +3,7 @@
# Let ./configure insert whether MG shall be documented
multigrid = @enablemultigrid@
+DOCXX = @docxx@
# specify which are the include files that a specific documentation libary
@@ -25,12 +26,6 @@ kdoc.dealII = $(kdoc.grid) $(kdoc.dof) $(kdoc.numerics)
# include global paths and variables
include ../../common/Make.global_options
-ifeq ($(shell uname),SunOS)
-DOCPP = /home/people/wolf/Config/doc++/bin/doc++
-#DOCPP = /home/people/kanschat/bin/doc++
-else
-DOCPP = doc++
-endif
# by default: make library doc and generate an index of all names
@@ -85,9 +80,18 @@ kdoc/names.html: $(kdoc.libray-files)
# used and since this forces make to re-make the .tex-file each time
# we ask for it; the right way to do so would be to use dependencies,
# but it is hard to compute them from the '%'-sign used in the rule
+ifeq ($(DOCXX),)
+%.tex:
+ @echo ---------------------------------------------
+ @echo "Doc++ was not found at ./configure time!"
+ @echo "Can't generate printable documentation."
+ @echo ---------------------------------------------
+ false
+else
%.tex: %.doc++
- $(DOCPP) -p -t -u -o $@ -ep a4wide $<
+ $(DOCXX) -p -t -u -o $@ -ep a4wide $<
rm $^
+endif
# generate temporary files from the doc++-latex-output which have
diff --git a/deal.II/doc/auto/kdoc/Makefile.in b/deal.II/doc/auto/kdoc/Makefile.in
index bcaa565d89..15e7cd369d 100644
--- a/deal.II/doc/auto/kdoc/Makefile.in
+++ b/deal.II/doc/auto/kdoc/Makefile.in
@@ -21,10 +21,6 @@ kdoc.numerics = $(shell echo $D/deal.II/include/numerics/*.h)
kdoc.multigrid= $(shell echo $D/deal.II/include/multigrid/*.h)
-# for latex-output, we join the different libraries of the
-# deal.II library into just one file
-kdoc.dealII = $(kdoc.grid) $(kdoc.dof) $(kdoc.numerics)
-
# specify the names of the resulting doc libraries
ifeq ($(multigrid),yes)
kdoc.library-files = base.kdoc \
diff --git a/deal.II/doc/readme.html b/deal.II/doc/readme.html
index 4915b67827..0b2d95b54c 100644
--- a/deal.II/doc/readme.html
+++ b/deal.II/doc/readme.html
@@ -347,6 +347,16 @@
of Unix systems, we presently support detection of the number of
CPUs in your system only for Linux and Solaris.
+
+
+
+ --with-docxx=doc++-path
: if you give the full path
+ (including file name of the executable) to the configure script,
+ then deal.II will use that file as the Doc++ executable for the
+ generation of printable documentation. If you don't specify that
+ flag and Doc++ is not in your PATH variable, then it is not
+ possible to generate printable documentation.
+
--
2.39.5