summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
commitcabc39c3e197e2591449d2604bfee26465fb60e1 (patch)
treed5f39f5f5965584bf9bf49646a2af617adfd3e4e /m4
parent7355f4c505092a7a85474b47f18d5206028e2c95 (diff)
parentab69f5df770ee3cc6cd6c81d905a5317b894a002 (diff)
downloadhdf5-feature/coding_standards.zip
hdf5-feature/coding_standards.tar.gz
hdf5-feature/coding_standards.tar.bz2
Merge branch 'develop' into feature/coding_standardsfeature/coding_standards
Diffstat (limited to 'm4')
-rw-r--r--m4/aclocal_cxx.m479
-rw-r--r--m4/aclocal_fc.f9054
-rw-r--r--m4/aclocal_fc.m4174
-rw-r--r--m4/ax_jni_include_dir.m418
-rw-r--r--m4/ax_prog_doxygen.m4586
5 files changed, 700 insertions, 211 deletions
diff --git a/m4/aclocal_cxx.m4 b/m4/aclocal_cxx.m4
deleted file mode 100644
index 29a0607..0000000
--- a/m4/aclocal_cxx.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-dnl -------------------------------------------------------------------------
-dnl -------------------------------------------------------------------------
-dnl
-dnl Copyright by the Board of Trustees of the University of Illinois.
-dnl All rights reserved.
-dnl
-dnl This file is part of HDF5. The full HDF5 copyright notice, including
-dnl terms governing use, modification, and redistribution, is contained in
-dnl the COPYING file, which can be found at the root of the source code
-dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-dnl If you do not have access to either file, you may request a copy from
-dnl help@hdfgroup.org
-dnl
-dnl -------------------------------------------------------------------------
-dnl -------------------------------------------------------------------------
-
-dnl *********************************
-dnl PURPOSE
-dnl Contains Macros for HDF5 C++
-dnl *********************************
-dnl
-dnl Special characteristics that have no autoconf counterpart but that
-dnl we need as part of the C++ support. To distinquish these, they
-dnl have a [PAC] prefix.
-
-dnl Checking if C++ needs old style header files in includes
-AC_DEFUN([PAC_PROG_CXX_HEADERS],[
- AC_MSG_CHECKING([if $CXX needs old style header files in includes])
- TEST_SRC="`(echo \"#define OLD_HEADER_FILENAME 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],
- [AC_MSG_RESULT([no])],
- [AC_MSG_RESULT([yes])
- CXXFLAGS="${CXXFLAGS} -DOLD_HEADER_FILENAME"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DOLD_HEADER_FILENAME"])
-])
-
-dnl Checking if ++ can handle namespaces
-AC_DEFUN([PAC_PROG_CXX_NAMESPACE],[
- AC_MSG_CHECKING([if $CXX can handle namespaces])
- TEST_SRC="`(echo \"#define HDF_NO_NAMESPACE 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- CXXFLAGS="${CXXFLAGS} -DHDF_NO_NAMESPACE"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DHDF_NO_NAMESPACE"])
-])
-
-dnl Checking if C++ supports std
-AC_DEFUN([PAC_PROG_CXX_STD],[
- AC_MSG_CHECKING([if $CXX supports std])
- TEST_SRC="`(echo \"#define HDF_NO_STD 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- CXXFLAGS="${CXXFLAGS} -DH5_NO_STD"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DH5_NO_STD"])
-])
-
-dnl Checking if C++ has offsetof extension
-AC_DEFUN([PAC_PROG_CXX_OFFSETOF],[
- AC_MSG_CHECKING([if $CXX has offsetof extension])
- TEST_SRC="`(echo \"#define CXX_HAVE_OFFSETOF 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])],[AC_MSG_RESULT([yes])
- AC_DEFINE([CXX_HAVE_OFFSETOF], [1], [Define if C++ compiler recognizes offsetof])],
- AC_MSG_RESULT([no]))
-])
-
-dnl Checking if C++ can handle static cast
-AC_DEFUN([PAC_PROG_CXX_STATIC_CAST],[
- AC_MSG_CHECKING([if $CXX can handle static cast])
- TEST_SRC="`(echo \"#define NO_STATIC_CAST 1\"; cat $srcdir/config/cmake_ext_mod/HDFCXXTests.cpp)`"
-
- AC_LINK_IFELSE([AC_LANG_SOURCE([$TEST_SRC])], [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- CXXFLAGS="${CXXFLAGS} -DNO_STATIC_CAST"
- AM_CXXFLAGS="${AM_CXXFLAGS} -DNO_STATIC_CAST"])
-])
diff --git a/m4/aclocal_fc.f90 b/m4/aclocal_fc.f90
index 664a3c6..bcefab5 100644
--- a/m4/aclocal_fc.f90
+++ b/m4/aclocal_fc.f90
@@ -6,17 +6,17 @@
! This file is part of HDF5. The full HDF5 copyright notice, including *
! terms governing use, modification, and redistribution, is contained in *
! the COPYING file, which can be found at the root of the source code *
-! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! distribution tree, or in https://www.hdfgroup.org/licenses. *
! If you do not have access to either file, you may request a copy from *
! help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
-! This file contains all the configure test programs
+! This file contains all the configure test programs
! used by autotools and cmake. This avoids having to
! duplicate code for both cmake and autotool tests.
! For autotools, a program below is chosen via a
! sed command in aclocal_fc.m4. For cmake, a program
-! below is chosen via the macro READ_SOURCE in
+! below is chosen via the macro READ_SOURCE in
! HDF5UseFortran.cmake
!
@@ -82,13 +82,13 @@ END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE
!---- START ----- Determine the available KINDs for REALs and INTEGERs
PROGRAM FC_AVAIL_KINDS
+ USE, INTRINSIC :: ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT
IMPLICIT NONE
- INTEGER :: ik, jk, k, max_decimal_prec
- INTEGER :: num_rkinds = 1, num_ikinds = 1
+ INTEGER :: ik, jk, k, kk, max_decimal_prec
+ INTEGER :: prev_rkind, num_rkinds = 1, num_ikinds = 1
INTEGER, DIMENSION(1:10) :: list_ikinds = -1
INTEGER, DIMENSION(1:10) :: list_rkinds = -1
-
- OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
+ LOGICAL :: new_kind
! Find integer KINDs
list_ikinds(num_ikinds)=SELECTED_INT_KIND(1)
@@ -102,48 +102,60 @@ PROGRAM FC_AVAIL_KINDS
ENDDO
DO k = 1, num_ikinds
- WRITE(8,'(I0)', ADVANCE='NO') list_ikinds(k)
+ WRITE(stderr,'(I0)', ADVANCE='NO') list_ikinds(k)
IF(k.NE.num_ikinds)THEN
- WRITE(8,'(A)',ADVANCE='NO') ','
+ WRITE(stderr,'(A)',ADVANCE='NO') ','
ELSE
- WRITE(8,'()')
+ WRITE(stderr,'()')
ENDIF
ENDDO
! Find real KINDs
list_rkinds(num_rkinds)=SELECTED_REAL_KIND(1)
max_decimal_prec = 1
+ prev_rkind=list_rkinds(num_rkinds)
prec: DO ik = 2, 36
- exp: DO jk = 1, 17000
+ exp: DO jk = 1, 700
k = SELECTED_REAL_KIND(ik,jk)
IF(k.LT.0) EXIT exp
- IF(k.GT.list_rkinds(num_rkinds))THEN
- num_rkinds = num_rkinds + 1
- list_rkinds(num_rkinds) = k
+ IF(k.NE.prev_rkind)THEN
+ ! Check if we already have that kind
+ new_kind = .TRUE.
+ DO kk = 1, num_rkinds
+ IF(k.EQ.list_rkinds(kk))THEN
+ new_kind=.FALSE.
+ EXIT
+ ENDIF
+ ENDDO
+ IF(new_kind)THEN
+ num_rkinds = num_rkinds + 1
+ list_rkinds(num_rkinds) = k
+ prev_rkind=list_rkinds(num_rkinds)
+ ENDIF
ENDIF
max_decimal_prec = ik
ENDDO exp
ENDDO prec
DO k = 1, num_rkinds
- WRITE(8,'(I0)', ADVANCE='NO') list_rkinds(k)
+ WRITE(stderr,'(I0)', ADVANCE='NO') list_rkinds(k)
IF(k.NE.num_rkinds)THEN
- WRITE(8,'(A)',ADVANCE='NO') ','
+ WRITE(stderr,'(A)',ADVANCE='NO') ','
ELSE
- WRITE(8,'()')
+ WRITE(stderr,'()')
ENDIF
ENDDO
- WRITE(8,'(I0)') max_decimal_prec
- WRITE(8,'(I0)') num_ikinds
- WRITE(8,'(I0)') num_rkinds
+ WRITE(stderr,'(I0)') max_decimal_prec
+ WRITE(stderr,'(I0)') num_ikinds
+ WRITE(stderr,'(I0)') num_rkinds
END PROGRAM FC_AVAIL_KINDS
!---- END ----- Determine the available KINDs for REALs and INTEGERs
PROGRAM FC_MPI_CHECK
INCLUDE 'mpif.h'
INTEGER :: comm, amode, info, fh, ierror
- CHARACTER(LEN=1) :: filename
+ CHARACTER(LEN=1) :: filename
CALL MPI_File_open( comm, filename, amode, info, fh, ierror)
END PROGRAM FC_MPI_CHECK
diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4
index ab45bbc..9d01f47 100644
--- a/m4/aclocal_fc.m4
+++ b/m4/aclocal_fc.m4
@@ -7,7 +7,7 @@ dnl
dnl This file is part of HDF5. The full HDF5 copyright notice, including
dnl terms governing use, modification, and redistribution, is contained in
dnl the COPYING file, which can be found at the root of the source code
-dnl distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+dnl distribution tree, or in https://www.hdfgroup.org/licenses.
dnl If you do not have access to either file, you may request a copy from
dnl help@hdfgroup.org
dnl
@@ -20,7 +20,7 @@ dnl Contains Macros for HDF5 Fortran
dnl *********************************
dnl
dnl Special characteristics that have no autoconf counterpart but that
-dnl we need as part of the C++ support. To distinquish these, they
+dnl we need as part of the C++ support. To distinguish these, they
dnl have a [PAC] prefix.
dnl
dnl -------------------------------------------------------------------------
@@ -30,7 +30,7 @@ dnl fortran compilers for use with AC_PROG_FC that is more suitable for HPC
dnl software packages
AC_DEFUN([PAC_FC_SEARCH_LIST],
[gfortran ifort pgf90 pathf90 pathf95 xlf90 xlf95 xlf2003 f90 epcf90 f95 fort lf95 g95 ifc efc gfc])
-dnl
+dnl
dnl PAC_PROG_FC([COMPILERS])
dnl
dnl COMPILERS is a space separated list of Fortran compilers to search for.
@@ -54,10 +54,10 @@ dnl ifc - An older Intel compiler
dnl fc - A compiler on some unknown system. This has been removed because
dnl it may also be the name of a command for something other than
dnl the Fortran compiler (e.g., fc=file system check!)
-dnl gfortran - The GNU Fortran compiler (not the same as g95)
+dnl gfortran - The GNU Fortran compiler (not the same as g95)
dnl gfc - An alias for gfortran recommended in cygwin installations
dnl NOTE: this macro suffers from a basically intractable "expanded before it
-dnl was required" problem when libtool is also used
+dnl was required" problem when libtool is also used
dnl [1] MPICH.org
dnl
@@ -66,9 +66,9 @@ dnl See if the fortran compiler supports the intrinsic module "ISO_FORTRAN_ENV"
AC_DEFUN([PAC_PROG_FC_ISO_FORTRAN_ENV],[
HAVE_ISO_FORTRAN_ENV="no"
AC_MSG_CHECKING([if Fortran compiler supports intrinsic module ISO_FORTRAN_ENV])
- TEST_SRC="`sed -n '/PROGRAM PROG_FC_ISO_FORTRAN_ENV/,/END PROGRAM PROG_FC_ISO_FORTRAN_ENV/p' $srcdir/m4/aclocal_fc.f90`"
+ TEST_SRC="`sed -n '/PROGRAM PROG_FC_ISO_FORTRAN_ENV/,/END PROGRAM PROG_FC_ISO_FORTRAN_ENV/p' $srcdir/m4/aclocal_fc.f90`"
AC_LINK_IFELSE([$TEST_SRC],[AC_MSG_RESULT([yes])
- HAVE_ISO_FORTRAN_ENV="yes"],
+ HAVE_ISO_FORTRAN_ENV="yes"],
[AC_MSG_RESULT([no])])
])
@@ -79,7 +79,7 @@ AC_DEFUN([PAC_PROG_FC_SIZEOF],[
AC_MSG_CHECKING([if Fortran compiler supports intrinsic SIZEOF])
TEST_SRC="`sed -n '/PROGRAM PROG_FC_SIZEOF/,/END PROGRAM PROG_FC_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`"
AC_LINK_IFELSE([$TEST_SRC],[AC_MSG_RESULT([yes])
- HAVE_SIZEOF_FORTRAN="yes"],
+ HAVE_SIZEOF_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
@@ -90,7 +90,7 @@ AC_DEFUN([PAC_PROG_FC_C_SIZEOF],[
AC_MSG_CHECKING([if Fortran compiler supports intrinsic C_SIZEOF])
TEST_SRC="`sed -n '/PROGRAM PROG_FC_C_SIZEOF/,/END PROGRAM PROG_FC_C_SIZEOF/p' $srcdir/m4/aclocal_fc.f90`"
AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
- HAVE_C_SIZEOF_FORTRAN="yes"],
+ HAVE_C_SIZEOF_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
@@ -101,7 +101,7 @@ AC_DEFUN([PAC_PROG_FC_STORAGE_SIZE],[
AC_MSG_CHECKING([if Fortran compiler supports intrinsic STORAGE_SIZE])
TEST_SRC="`sed -ne '/PROGRAM PROG_FC_STORAGE_SIZE/,/END PROGRAM PROG_FC_STORAGE_SIZE/p' $srcdir/m4/aclocal_fc.f90`"
AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
- HAVE_STORAGE_SIZE_FORTRAN="yes"],
+ HAVE_STORAGE_SIZE_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
@@ -114,7 +114,7 @@ AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[
TEST_SRC=""
TEST_SRC="`sed -n '/PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE/,/END PROGRAM PROG_FC_HAVE_C_LONG_DOUBLE/p' $srcdir/m4/aclocal_fc.f90`"
AC_LINK_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
- HAVE_C_LONG_DOUBLE_FORTRAN="yes"],
+ HAVE_C_LONG_DOUBLE_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
@@ -122,11 +122,11 @@ dnl Check if C_LONG_DOUBLE is different from C_DOUBLE
if test "X$FORTRAN_HAVE_C_LONG_DOUBLE" = "Xyes"; then
AC_DEFUN([PAC_PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE],[
- C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no"
+ C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="no"
AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is different from C_DOUBLE])
TEST_SRC="`sed -n '/MODULE type_mod/,/END PROGRAM PROG_FC_C_LONG_DOUBLE_EQ_C_DOUBLE/p' $srcdir/m4/aclocal_fc.f90`"
- AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
- C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"],
+ AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
+ C_LONG_DOUBLE_IS_UNIQUE_FORTRAN="yes"],
[AC_MSG_RESULT([no])])
])
fi
@@ -138,16 +138,16 @@ AC_DEFUN([PAC_PROG_FC_HAVE_F2003_REQUIREMENTS],[
HAVE_F2003_REQUIREMENTS="no"
AC_MSG_CHECKING([if Fortran compiler version compatible with Fortran 2003 HDF])
TEST_SRC="`sed -n '/PROG_FC_HAVE_F2003_REQUIREMENTS/,/END PROGRAM PROG_FC_HAVE_F2003_REQUIREMENTS/p' $srcdir/m4/aclocal_fc.f90`"
- AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
- HAVE_F2003_REQUIREMENTS="yes"],
+ AC_COMPILE_IFELSE([$TEST_SRC], [AC_MSG_RESULT([yes])
+ HAVE_F2003_REQUIREMENTS="yes"],
[AC_MSG_RESULT([no])])
])
dnl -------------------------------------------------------------------------
dnl AC_F9X_MODS()
dnl
-dnl Check how F9X handles modules. This macro also checks which
-dnl command-line option to use to include the module once it's built.
+dnl Check how F9X handles modules. This macro also checks which
+dnl command-line option to use to include the module once it's built.
dnl
AC_DEFUN([AC_F9X_MODS],
[AC_MSG_CHECKING(what $FC does with modules)
@@ -223,7 +223,6 @@ else
fi
AC_SUBST(F9XMODFLAG)
AC_SUBST(F9XMODEXT)
-rm -rf conftest*
AC_LANG_POP(Fortran)
])
@@ -241,9 +240,9 @@ dnl Change to the Fortran 90 language
dnl Try link a simple MPI program.
AC_MSG_CHECKING([whether a simple MPI-IO Fortran program can be linked])
AC_LINK_IFELSE([$TEST_SRC],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])])
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_MSG_ERROR([unable to link a simple MPI-IO Fortran program])])
dnl Change to the C language
AC_LANG_POP(Fortran)
@@ -257,51 +256,43 @@ dnl This is a runtime test.
dnl
AC_DEFUN([PAC_FC_AVAIL_KINDS],[
AC_LANG_PUSH([Fortran])
-rm -f pac_fconftest.out
TEST_SRC="`sed -n '/PROGRAM FC_AVAIL_KINDS/,/END PROGRAM FC_AVAIL_KINDS/p' $srcdir/m4/aclocal_fc.f90`"
AC_RUN_IFELSE([$TEST_SRC],
[
- if test -s pac_fconftest.out ; then
-
- dnl The output from the above program will be:
- dnl -- LINE 1 -- valid integer kinds (comma seperated list)
- dnl -- LINE 2 -- valid real kinds (comma seperated list)
- dnl -- LINE 3 -- max decimal precision for reals
- dnl -- LINE 4 -- number of valid integer kinds
- dnl -- LINE 5 -- number of valid real kinds
-
- pac_validIntKinds="`sed -n '1p' pac_fconftest.out`"
- pac_validRealKinds="`sed -n '2p' pac_fconftest.out`"
- PAC_FC_MAX_REAL_PRECISION="`sed -n '3p' pac_fconftest.out`"
+ dnl The output from the above program will be:
+ dnl -- LINE 1 -- valid integer kinds (comma separated list)
+ dnl -- LINE 2 -- valid real kinds (comma separated list)
+ dnl -- LINE 3 -- max decimal precision for reals
+ dnl -- LINE 4 -- number of valid integer kinds
+ dnl -- LINE 5 -- number of valid real kinds
+
+ pac_validIntKinds=$(./conftest$EXEEXT 2>&1 | sed -n '1p')
+ pac_validRealKinds=$(./conftest$EXEEXT 2>&1 | sed -n '2p')
+ PAC_FC_MAX_REAL_PRECISION=$(./conftest$EXEEXT 2>&1 | sed -n '3p')
AC_DEFINE_UNQUOTED([PAC_FC_MAX_REAL_PRECISION], $PAC_FC_MAX_REAL_PRECISION, [Define Fortran Maximum Real Decimal Precision])
PAC_FC_ALL_INTEGER_KINDS="{`echo $pac_validIntKinds`}"
PAC_FC_ALL_REAL_KINDS="{`echo $pac_validRealKinds`}"
- PAC_FORTRAN_NUM_INTEGER_KINDS="`sed -n '4p' pac_fconftest.out`"
- H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $PAC_FORTRAN_NUM_INTEGER_KINDS`"
- H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)"
- H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = `sed -n '5p' pac_fconftest.out`"
- H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)"
+ PAC_FORTRAN_NUM_INTEGER_KINDS=$(./conftest$EXEEXT 2>&1 | sed -n '4p')
+ H5CONFIG_F_NUM_IKIND="INTEGER, PARAMETER :: num_ikinds = `echo $PAC_FORTRAN_NUM_INTEGER_KINDS`"
+ H5CONFIG_F_IKIND="INTEGER, DIMENSION(1:num_ikinds) :: ikind = (/`echo $pac_validIntKinds`/)"
+ H5CONFIG_F_NUM_RKIND="INTEGER, PARAMETER :: num_rkinds = $(./conftest$EXEEXT 2>&1 | sed -n '5p')"
+ H5CONFIG_F_RKIND="INTEGER, DIMENSION(1:num_rkinds) :: rkind = (/`echo $pac_validRealKinds`/)"
- AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
- AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs])
- AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])
- AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_RKIND], $H5CONFIG_F_NUM_RKIND, [Define number of valid Fortran REAL KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_NUM_IKIND], $H5CONFIG_F_NUM_IKIND, [Define number of valid Fortran INTEGER KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_RKIND], $H5CONFIG_F_RKIND, [Define valid Fortran REAL KINDs])
+ AC_DEFINE_UNQUOTED([H5CONFIG_F_IKIND], $H5CONFIG_F_IKIND, [Define valid Fortran INTEGER KINDs])
AC_MSG_CHECKING([for Number of Fortran INTEGER KINDs])
AC_MSG_RESULT([$PAC_FORTRAN_NUM_INTEGER_KINDS])
AC_MSG_CHECKING([for Fortran INTEGER KINDs])
AC_MSG_RESULT([$PAC_FC_ALL_INTEGER_KINDS])
- AC_MSG_CHECKING([for Fortran REAL KINDs])
- AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS])
- AC_MSG_CHECKING([for Fortran REALs maximum decimal precision])
- AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION])
- else
- AC_MSG_RESULT([Error])
- AC_MSG_ERROR([No output from Fortran test program!])
- fi
- rm -f pac_fconftest.out
+ AC_MSG_CHECKING([for Fortran REAL KINDs])
+ AC_MSG_RESULT([$PAC_FC_ALL_REAL_KINDS])
+ AC_MSG_CHECKING([for Fortran REALs maximum decimal precision])
+ AC_MSG_RESULT([$PAC_FC_MAX_REAL_PRECISION])
],[
AC_MSG_RESULT([Error])
AC_MSG_ERROR([Failed to run Fortran program to determine available KINDs])
@@ -314,29 +305,22 @@ AC_REQUIRE([PAC_FC_AVAIL_KINDS])
AC_MSG_CHECKING([sizeof of available INTEGER KINDs])
AC_LANG_PUSH([Fortran])
pack_int_sizeof=""
-rm -f pac_fconftest.out
for kind in `echo $pac_validIntKinds | sed -e 's/,/ /g'`; do
AC_LANG_CONFTEST([
AC_LANG_SOURCE([
PROGRAM main
USE ISO_C_BINDING
+ USE ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT
IMPLICIT NONE
INTEGER (KIND=$kind) a
- OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
- WRITE(8,'(I0)') $FC_SIZEOF_A
- CLOSE(8)
+ WRITE(stderr,'(I0)') $FC_SIZEOF_A
END
])
])
AC_RUN_IFELSE([],[
- if test -s pac_fconftest.out ; then
- sizes="`cat pac_fconftest.out`"
- pack_int_sizeof="$pack_int_sizeof $sizes,"
- else
- AC_MSG_ERROR([No output from Fortran test program!])
- fi
- rm -f pac_fconftest.out
+ sizes=$(./conftest$EXEEXT 2>&1)
+ pack_int_sizeof="$pack_int_sizeof $sizes,"
],[
AC_MSG_ERROR([Fortran program fails to build or run!])
],[
@@ -359,22 +343,16 @@ for kind in `echo $pac_validRealKinds | sed -e 's/,/ /g'`; do
AC_LANG_SOURCE([
PROGRAM main
USE ISO_C_BINDING
+ USE ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT
IMPLICIT NONE
REAL (KIND=$kind) :: a
- OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
- WRITE(8,'(I0)') $FC_SIZEOF_A
- CLOSE(8)
+ WRITE(stderr,'(I0)') $FC_SIZEOF_A
END
])
])
AC_RUN_IFELSE([],[
- if test -s pac_fconftest.out ; then
- sizes="`cat pac_fconftest.out`"
- pack_real_sizeof="$pack_real_sizeof $sizes,"
- else
- AC_MSG_ERROR([No output from Fortran test program!])
- fi
- rm -f pac_fconftest.out
+ sizes=$(./conftest$EXEEXT 2>&1)
+ pack_real_sizeof="$pack_real_sizeof $sizes,"
],[
AC_MSG_ERROR([Fortran program fails to build or run!])
],[
@@ -396,33 +374,27 @@ rm -f pac_fconftest.out
AC_LANG_SOURCE([
PROGRAM main
USE ISO_C_BINDING
+ USE ISO_FORTRAN_ENV, ONLY : stderr=>ERROR_UNIT
IMPLICIT NONE
INTEGER a
REAL b
DOUBLE PRECISION c
- OPEN(8, FILE='pac_fconftest.out', FORM='formatted')
- WRITE(8,*) $FC_SIZEOF_A
- WRITE(8,*) KIND(a)
- WRITE(8,*) $FC_SIZEOF_B
- WRITE(8,*) KIND(b)
- WRITE(8,*) $FC_SIZEOF_C
- WRITE(8,*) KIND(c)
- CLOSE(8)
+ WRITE(stderr,*) $FC_SIZEOF_A
+ WRITE(stderr,*) KIND(a)
+ WRITE(stderr,*) $FC_SIZEOF_B
+ WRITE(stderr,*) KIND(b)
+ WRITE(stderr,*) $FC_SIZEOF_C
+ WRITE(stderr,*) KIND(c)
END
])
])
AC_RUN_IFELSE([],[
- if test -s pac_fconftest.out ; then
- PAC_FORTRAN_NATIVE_INTEGER_SIZEOF="`sed -n '1p' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_INTEGER_KIND="`sed -n '2p' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_REAL_SIZEOF="`sed -n '3p' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_REAL_KIND="`sed -n '4p' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF="`sed -n '5p' pac_fconftest.out`"
- PAC_FORTRAN_NATIVE_DOUBLE_KIND="`sed -n '6p' pac_fconftest.out`"
- else
- AC_MSG_ERROR([No output from Fortran test program!])
- fi
- rm -f pac_fconftest.out
+ PAC_FORTRAN_NATIVE_INTEGER_SIZEOF=$(./conftest$EXEEXT 2>&1 | sed -n '1p')
+ PAC_FORTRAN_NATIVE_INTEGER_KIND=$(./conftest$EXEEXT 2>&1 | sed -n '2p')
+ PAC_FORTRAN_NATIVE_REAL_SIZEOF=$(./conftest$EXEEXT 2>&1 | sed -n '3p')
+ PAC_FORTRAN_NATIVE_REAL_KIND=$(./conftest$EXEEXT 2>&1 | sed -n '4p')
+ PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF=$(./conftest$EXEEXT 2>&1 | sed -n '5p')
+ PAC_FORTRAN_NATIVE_DOUBLE_KIND=$(./conftest$EXEEXT 2>&1 | sed -n '6p')
],[
AC_MSG_ERROR([Fortran program fails to build or run!])
],[
@@ -434,7 +406,6 @@ AC_LANG_POP([Fortran])
AC_DEFUN([PAC_FC_LDBL_DIG],[
AC_MSG_CHECKING([maximum decimal precision for C])
-rm -f pac_Cconftest.out
AC_LANG_CONFTEST([
AC_LANG_PROGRAM([
#include <float.h>
@@ -453,24 +424,17 @@ rm -f pac_Cconftest.out
#define C_FLT128_DIG 0
#endif
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define C_LDBL_DIG DECIMAL_DIG
+ #define C_LDBL_DIG DECIMAL_DIG
#else
#define C_LDBL_DIG LDBL_DIG
#endif
],[[
- FILE * pFile;
- pFile = fopen("pac_Cconftest.out","w");
- fprintf(pFile, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG);
+ fprintf(stderr, "%d\n%d\n", C_LDBL_DIG, C_FLT128_DIG);
]])
])
AC_RUN_IFELSE([],[
- if test -s pac_Cconftest.out ; then
- LDBL_DIG="`sed -n '1p' pac_Cconftest.out`"
- FLT128_DIG="`sed -n '2p' pac_Cconftest.out`"
- else
- AC_MSG_ERROR([No output from C decimal precision program!])
- fi
- rm -f pac_Cconftest.out
+ LDBL_DIG=$(./conftest$EXEEXT 2>&1 | sed -n '1p')
+ FLT128_DIG=$(./conftest$EXEEXT 2>&1 | sed -n '2p')
],[
AC_MSG_ERROR([C program fails to build or run!])
],[])
diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4
index ae7a5f0..cd72098 100644
--- a/m4/ax_jni_include_dir.m4
+++ b/m4/ax_jni_include_dir.m4
@@ -73,13 +73,19 @@ fi
case "$host_os" in
darwin*) # Apple Java headers are inside the Xcode bundle.
- macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p')
- if @<:@ "$macos_version" -gt "7" @:>@; then
- _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework"
- _JINC="$_JTOPDIR/Headers"
+ major_macos_version=$(sw_vers -productVersion | sed -n -e 's/^\(@<:@0-9@:>@*\).@<:@0-9@:>@*.@<:@0-9@:>@*/\1/p')
+ if @<:@ "$major_macos_version" -gt "10" @:>@; then
+ _JTOPDIR="$(/usr/libexec/java_home)"
+ _JINC="$_JTOPDIR/include"
else
- _JTOPDIR="/System/Library/Frameworks/JavaVM.framework"
- _JINC="$_JTOPDIR/Headers"
+ macos_version=$(sw_vers -productVersion | sed -n -e 's/^@<:@0-9@:>@*.\(@<:@0-9@:>@*\).@<:@0-9@:>@*/\1/p')
+ if @<:@ "$macos_version" -gt "7" @:>@; then
+ _JTOPDIR="$(xcrun --show-sdk-path)/System/Library/Frameworks/JavaVM.framework"
+ _JINC="$_JTOPDIR/Headers"
+ else
+ _JTOPDIR="/System/Library/Frameworks/JavaVM.framework"
+ _JINC="$_JTOPDIR/Headers"
+ fi
fi
;;
*) _JINC="$_JTOPDIR/include";;
diff --git a/m4/ax_prog_doxygen.m4 b/m4/ax_prog_doxygen.m4
new file mode 100644
index 0000000..a371f7f
--- /dev/null
+++ b/m4/ax_prog_doxygen.m4
@@ -0,0 +1,586 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# DX_INIT_DOXYGEN(PROJECT-NAME, [DOXYFILE-PATH], [OUTPUT-DIR], ...)
+# DX_DOXYGEN_FEATURE(ON|OFF)
+# DX_DOT_FEATURE(ON|OFF)
+# DX_HTML_FEATURE(ON|OFF)
+# DX_CHM_FEATURE(ON|OFF)
+# DX_CHI_FEATURE(ON|OFF)
+# DX_MAN_FEATURE(ON|OFF)
+# DX_RTF_FEATURE(ON|OFF)
+# DX_XML_FEATURE(ON|OFF)
+# DX_PDF_FEATURE(ON|OFF)
+# DX_PS_FEATURE(ON|OFF)
+#
+# DESCRIPTION
+#
+# The DX_*_FEATURE macros control the default setting for the given
+# Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for
+# generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML
+# help (for MS users), 'CHI' for generating a separate .chi file by the
+# .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate
+# output formats. The environment variable DOXYGEN_PAPER_SIZE may be
+# specified to override the default 'a4wide' paper size.
+#
+# By default, HTML, PDF and PS documentation is generated as this seems to
+# be the most popular and portable combination. MAN pages created by
+# Doxygen are usually problematic, though by picking an appropriate subset
+# and doing some massaging they might be better than nothing. CHM and RTF
+# are specific for MS (note that you can't generate both HTML and CHM at
+# the same time). The XML is rather useless unless you apply specialized
+# post-processing to it.
+#
+# The macros mainly control the default state of the feature. The use can
+# override the default by specifying --enable or --disable. The macros
+# ensure that contradictory flags are not given (e.g.,
+# --enable-doxygen-html and --enable-doxygen-chm,
+# --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each
+# feature will be automatically disabled (with a warning) if the required
+# programs are missing.
+#
+# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN
+# with the following parameters: a one-word name for the project for use
+# as a filename base etc., an optional configuration file name (the
+# default is '$(srcdir)/Doxyfile', the same as Doxygen's default), and an
+# optional output directory name (the default is 'doxygen-doc'). To run
+# doxygen multiple times for different configuration files and output
+# directories provide more parameters: the second, forth, sixth, etc
+# parameter are configuration file names and the third, fifth, seventh,
+# etc parameter are output directories. No checking is done to catch
+# duplicates.
+#
+# Automake Support
+#
+# The DX_RULES substitution can be used to add all needed rules to the
+# Makefile. Note that this is a substitution without being a variable:
+# only the @DX_RULES@ syntax will work.
+#
+# The provided targets are:
+#
+# doxygen-doc: Generate all doxygen documentation.
+#
+# doxygen-run: Run doxygen, which will generate some of the
+# documentation (HTML, CHM, CHI, MAN, RTF, XML)
+# but will not do the post processing required
+# for the rest of it (PS, PDF).
+#
+# doxygen-ps: Generate doxygen PostScript documentation.
+#
+# doxygen-pdf: Generate doxygen PDF documentation.
+#
+# Note that by default these are not integrated into the automake targets.
+# If doxygen is used to generate man pages, you can achieve this
+# integration by setting man3_MANS to the list of man pages generated and
+# then adding the dependency:
+#
+# $(man3_MANS): doxygen-doc
+#
+# This will cause make to run doxygen and generate all the documentation.
+#
+# The following variable is intended for use in Makefile.am:
+#
+# DX_CLEANFILES = everything to clean.
+#
+# Then add this variable to MOSTLYCLEANFILES.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Oren Ben-Kiki <oren@ben-kiki.org>
+# Copyright (c) 2015 Olaf Mandel <olaf@mandel.name>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 23
+
+## ----------##
+## Defaults. ##
+## ----------##
+
+DX_ENV=""
+AC_DEFUN([DX_FEATURE_doc], ON)
+AC_DEFUN([DX_FEATURE_dot], OFF)
+AC_DEFUN([DX_FEATURE_man], OFF)
+AC_DEFUN([DX_FEATURE_html], ON)
+AC_DEFUN([DX_FEATURE_chm], OFF)
+AC_DEFUN([DX_FEATURE_chi], OFF)
+AC_DEFUN([DX_FEATURE_rtf], OFF)
+AC_DEFUN([DX_FEATURE_xml], OFF)
+AC_DEFUN([DX_FEATURE_pdf], ON)
+AC_DEFUN([DX_FEATURE_ps], ON)
+
+## --------------- ##
+## Private macros. ##
+## --------------- ##
+
+# DX_ENV_APPEND(VARIABLE, VALUE)
+# ------------------------------
+# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen and add it
+# as a substitution (but not a Makefile variable). The substitution
+# is skipped if the variable name is VERSION.
+AC_DEFUN([DX_ENV_APPEND],
+[AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])dnl
+m4_if([$1], [VERSION], [], [AC_SUBST([$1], [$2])dnl
+AM_SUBST_NOTMAKE([$1])])dnl
+])
+
+# DX_DIRNAME_EXPR
+# ---------------
+# Expand into a shell expression prints the directory part of a path.
+AC_DEFUN([DX_DIRNAME_EXPR],
+ [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
+
+# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
+# -------------------------------------
+# Expands according to the M4 (static) status of the feature.
+AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
+
+# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
+# ----------------------------------
+# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
+AC_DEFUN([DX_REQUIRE_PROG], [
+AC_PATH_TOOL([$1], [$2])
+if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
+ AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
+ AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
+fi
+])
+
+# DX_TEST_FEATURE(FEATURE)
+# ------------------------
+# Expand to a shell expression testing whether the feature is active.
+AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
+
+# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
+# -------------------------------------------------
+# Verify that a required features has the right state before trying to turn on
+# the DX_CURRENT_FEATURE.
+AC_DEFUN([DX_CHECK_DEPEND], [
+test "$DX_FLAG_$1" = "$2" \
+|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
+ requires, contradicts) doxygen-DX_CURRENT_FEATURE])
+])
+
+# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
+# ----------------------------------------------------------
+# Turn off the DX_CURRENT_FEATURE if the required feature is off.
+AC_DEFUN([DX_CLEAR_DEPEND], [
+test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0)
+])
+
+# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
+# CHECK_DEPEND, CLEAR_DEPEND,
+# REQUIRE, DO-IF-ON, DO-IF-OFF)
+# --------------------------------------------
+# Parse the command-line option controlling a feature. CHECK_DEPEND is called
+# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
+# otherwise CLEAR_DEPEND is called to turn off the default state if a required
+# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
+# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
+# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
+AC_DEFUN([DX_ARG_ABLE], [
+ AC_DEFUN([DX_CURRENT_FEATURE], [$1])
+ AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
+ AC_ARG_ENABLE(doxygen-$1,
+ [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
+ [--enable-doxygen-$1]),
+ DX_IF_FEATURE([$1], [don't $2], [$2]))],
+ [
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ AC_SUBST([DX_FLAG_$1], 1)
+ $3
+;; #(
+n|N|no|No|NO)
+ AC_SUBST([DX_FLAG_$1], 0)
+;; #(
+*)
+ AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
+;;
+esac
+], [
+AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
+$4
+])
+if DX_TEST_FEATURE([$1]); then
+ $5
+ :
+fi
+if DX_TEST_FEATURE([$1]); then
+ $6
+ :
+else
+ $7
+ :
+fi
+])
+
+## -------------- ##
+## Public macros. ##
+## -------------- ##
+
+# DX_XXX_FEATURE(DEFAULT_STATE)
+# -----------------------------
+AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])])
+AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])])
+AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])])
+AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])])
+AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])])
+AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])])
+AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])])
+AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
+AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
+AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])])
+AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])])
+
+# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR], ...)
+# --------------------------------------------------------------
+# PROJECT also serves as the base name for the documentation files.
+# The default CONFIG-FILE is "$(srcdir)/Doxyfile" and OUTPUT-DOC-DIR is
+# "doxygen-doc".
+# More arguments are interpreted as interleaved CONFIG-FILE and
+# OUTPUT-DOC-DIR values.
+AC_DEFUN([DX_INIT_DOXYGEN], [
+
+# Files:
+AC_SUBST([DX_PROJECT], [$1])
+AC_SUBST([DX_CONFIG], ['ifelse([$2], [], [$(srcdir)/Doxyfile], [$2])'])
+AC_SUBST([DX_DOCDIR], ['ifelse([$3], [], [doxygen-doc], [$3])'])
+m4_if(m4_eval(3 < m4_count($@)), 1, [m4_for([DX_i], 4, m4_count($@), 2,
+ [AC_SUBST([DX_CONFIG]m4_eval(DX_i[/2]),
+ 'm4_default_nblank_quoted(m4_argn(DX_i, $@),
+ [$(srcdir)/Doxyfile])')])])dnl
+m4_if(m4_eval(3 < m4_count($@)), 1, [m4_for([DX_i], 5, m4_count($@,), 2,
+ [AC_SUBST([DX_DOCDIR]m4_eval([(]DX_i[-1)/2]),
+ 'm4_default_nblank_quoted(m4_argn(DX_i, $@),
+ [doxygen-doc])')])])dnl
+m4_define([DX_loop], m4_dquote(m4_if(m4_eval(3 < m4_count($@)), 1,
+ [m4_for([DX_i], 4, m4_count($@), 2, [, m4_eval(DX_i[/2])])],
+ [])))dnl
+
+# Environment variables used inside doxygen.cfg:
+DX_ENV_APPEND(SRCDIR, $srcdir)
+DX_ENV_APPEND(PROJECT, $DX_PROJECT)
+DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
+
+# Doxygen itself:
+DX_ARG_ABLE(doc, [generate any doxygen documentation],
+ [],
+ [],
+ [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
+ DX_REQUIRE_PROG([DX_PERL], perl)],
+ [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
+
+# Dot for graphics:
+DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_DOT], dot)],
+ [DX_ENV_APPEND(HAVE_DOT, YES)
+ DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
+ [DX_ENV_APPEND(HAVE_DOT, NO)])
+
+# Man pages generation:
+DX_ARG_ABLE(man, [generate doxygen manual pages],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_MAN, YES)],
+ [DX_ENV_APPEND(GENERATE_MAN, NO)])
+
+# RTF file generation:
+DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_RTF, YES)],
+ [DX_ENV_APPEND(GENERATE_RTF, NO)])
+
+# XML file generation:
+DX_ARG_ABLE(xml, [generate doxygen XML documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_XML, YES)],
+ [DX_ENV_APPEND(GENERATE_XML, NO)])
+
+# (Compressed) HTML help generation:
+DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_HHC], hhc)],
+ [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
+ DX_ENV_APPEND(GENERATE_HTML, YES)
+ DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
+ [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
+
+# Separate CHI file generation.
+DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file],
+ [DX_CHECK_DEPEND(chm, 1)],
+ [DX_CLEAR_DEPEND(chm, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_CHI, YES)],
+ [DX_ENV_APPEND(GENERATE_CHI, NO)])
+
+# Plain HTML pages generation:
+DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
+ [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
+ [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
+ [],
+ [DX_ENV_APPEND(GENERATE_HTML, YES)],
+ [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
+
+# PostScript file generation:
+DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_LATEX], latex)
+ DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
+ DX_REQUIRE_PROG([DX_DVIPS], dvips)
+ DX_REQUIRE_PROG([DX_EGREP], egrep)])
+
+# PDF file generation:
+DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
+ DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
+ DX_REQUIRE_PROG([DX_EGREP], egrep)])
+
+# LaTeX generation for PS and/or PDF:
+if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
+ DX_ENV_APPEND(GENERATE_LATEX, YES)
+else
+ DX_ENV_APPEND(GENERATE_LATEX, NO)
+fi
+
+# Paper size for PS and/or PDF:
+AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
+ [a4wide (default), a4, letter, legal or executive])
+case "$DOXYGEN_PAPER_SIZE" in
+#(
+"")
+ AC_SUBST(DOXYGEN_PAPER_SIZE, "")
+;; #(
+a4wide|a4|letter|legal|executive)
+ DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
+;; #(
+*)
+ AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
+;;
+esac
+
+# Rules:
+AS_IF([[test $DX_FLAG_html -eq 1]],
+[[DX_SNIPPET_html="## ------------------------------- ##
+## Rules specific for HTML output. ##
+## ------------------------------- ##
+
+DX_CLEAN_HTML = \$(DX_DOCDIR)/html]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/html]])[
+
+"]],
+[[DX_SNIPPET_html=""]])
+AS_IF([[test $DX_FLAG_chi -eq 1]],
+[[DX_SNIPPET_chi="
+DX_CLEAN_CHI = \$(DX_DOCDIR)/\$(PACKAGE).chi]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).chi]])["]],
+[[DX_SNIPPET_chi=""]])
+AS_IF([[test $DX_FLAG_chm -eq 1]],
+[[DX_SNIPPET_chm="## ------------------------------ ##
+## Rules specific for CHM output. ##
+## ------------------------------ ##
+
+DX_CLEAN_CHM = \$(DX_DOCDIR)/chm]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/chm]])[\
+${DX_SNIPPET_chi}
+
+"]],
+[[DX_SNIPPET_chm=""]])
+AS_IF([[test $DX_FLAG_man -eq 1]],
+[[DX_SNIPPET_man="## ------------------------------ ##
+## Rules specific for MAN output. ##
+## ------------------------------ ##
+
+DX_CLEAN_MAN = \$(DX_DOCDIR)/man]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/man]])[
+
+"]],
+[[DX_SNIPPET_man=""]])
+AS_IF([[test $DX_FLAG_rtf -eq 1]],
+[[DX_SNIPPET_rtf="## ------------------------------ ##
+## Rules specific for RTF output. ##
+## ------------------------------ ##
+
+DX_CLEAN_RTF = \$(DX_DOCDIR)/rtf]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/rtf]])[
+
+"]],
+[[DX_SNIPPET_rtf=""]])
+AS_IF([[test $DX_FLAG_xml -eq 1]],
+[[DX_SNIPPET_xml="## ------------------------------ ##
+## Rules specific for XML output. ##
+## ------------------------------ ##
+
+DX_CLEAN_XML = \$(DX_DOCDIR)/xml]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/xml]])[
+
+"]],
+[[DX_SNIPPET_xml=""]])
+AS_IF([[test $DX_FLAG_ps -eq 1]],
+[[DX_SNIPPET_ps="## ----------------------------- ##
+## Rules specific for PS output. ##
+## ----------------------------- ##
+
+DX_CLEAN_PS = \$(DX_DOCDIR)/\$(PACKAGE).ps]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).ps]])[
+
+DX_PS_GOAL = doxygen-ps
+
+doxygen-ps: \$(DX_CLEAN_PS)
+
+]m4_foreach([DX_i], [DX_loop],
+[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).ps: \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag
+ \$(DX_V_LATEX)cd \$(DX_DOCDIR]DX_i[)/latex; \\
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\
+ \$(DX_LATEX) refman.tex; \\
+ \$(DX_MAKEINDEX) refman.idx; \\
+ \$(DX_LATEX) refman.tex; \\
+ countdown=5; \\
+ while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\
+ refman.log > /dev/null 2>&1 \\
+ && test \$\$countdown -gt 0; do \\
+ \$(DX_LATEX) refman.tex; \\
+ countdown=\`expr \$\$countdown - 1\`; \\
+ done; \\
+ \$(DX_DVIPS) -o ../\$(PACKAGE).ps refman.dvi
+
+]])["]],
+[[DX_SNIPPET_ps=""]])
+AS_IF([[test $DX_FLAG_pdf -eq 1]],
+[[DX_SNIPPET_pdf="## ------------------------------ ##
+## Rules specific for PDF output. ##
+## ------------------------------ ##
+
+DX_CLEAN_PDF = \$(DX_DOCDIR)/\$(PACKAGE).pdf]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).pdf]])[
+
+DX_PDF_GOAL = doxygen-pdf
+
+doxygen-pdf: \$(DX_CLEAN_PDF)
+
+]m4_foreach([DX_i], [DX_loop],
+[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).pdf: \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag
+ \$(DX_V_LATEX)cd \$(DX_DOCDIR]DX_i[)/latex; \\
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ \$(DX_MAKEINDEX) refman.idx; \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ countdown=5; \\
+ while \$(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \\
+ refman.log > /dev/null 2>&1 \\
+ && test \$\$countdown -gt 0; do \\
+ \$(DX_PDFLATEX) refman.tex; \\
+ countdown=\`expr \$\$countdown - 1\`; \\
+ done; \\
+ mv refman.pdf ../\$(PACKAGE).pdf
+
+]])["]],
+[[DX_SNIPPET_pdf=""]])
+AS_IF([[test $DX_FLAG_ps -eq 1 -o $DX_FLAG_pdf -eq 1]],
+[[DX_SNIPPET_latex="## ------------------------------------------------- ##
+## Rules specific for LaTeX (shared for PS and PDF). ##
+## ------------------------------------------------- ##
+
+DX_V_LATEX = \$(_DX_v_LATEX_\$(V))
+_DX_v_LATEX_ = \$(_DX_v_LATEX_\$(AM_DEFAULT_VERBOSITY))
+_DX_v_LATEX_0 = @echo \" LATEX \" \$][@;
+
+DX_CLEAN_LATEX = \$(DX_DOCDIR)/latex]dnl
+m4_foreach([DX_i], [m4_shift(DX_loop)], [[\\
+ \$(DX_DOCDIR]DX_i[)/latex]])[
+
+"]],
+[[DX_SNIPPET_latex=""]])
+
+AS_IF([[test $DX_FLAG_doc -eq 1]],
+[[DX_SNIPPET_doc="## --------------------------------- ##
+## Format-independent Doxygen rules. ##
+## --------------------------------- ##
+
+${DX_SNIPPET_html}\
+${DX_SNIPPET_chm}\
+${DX_SNIPPET_man}\
+${DX_SNIPPET_rtf}\
+${DX_SNIPPET_xml}\
+${DX_SNIPPET_ps}\
+${DX_SNIPPET_pdf}\
+${DX_SNIPPET_latex}\
+DX_V_DXGEN = \$(_DX_v_DXGEN_\$(V))
+_DX_v_DXGEN_ = \$(_DX_v_DXGEN_\$(AM_DEFAULT_VERBOSITY))
+_DX_v_DXGEN_0 = @echo \" DXGEN \" \$<;
+
+.PHONY: doxygen-run doxygen-doc \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+.INTERMEDIATE: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+doxygen-run:]m4_foreach([DX_i], [DX_loop],
+ [[ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag]])[
+
+doxygen-doc: doxygen-run \$(DX_PS_GOAL) \$(DX_PDF_GOAL)
+
+]m4_foreach([DX_i], [DX_loop],
+[[\$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag: \$(DX_CONFIG]DX_i[) \$(pkginclude_HEADERS)
+ \$(A""M_V_at)rm -rf \$(DX_DOCDIR]DX_i[)
+ \$(DX_V_DXGEN)\$(DX_ENV) DOCDIR=\$(DX_DOCDIR]DX_i[) \$(DX_DOXYGEN) \$(DX_CONFIG]DX_i[)
+ \$(A""M_V_at)echo Timestamp >\$][@
+
+]])dnl
+[DX_CLEANFILES = \\]
+m4_foreach([DX_i], [DX_loop],
+[[ \$(DX_DOCDIR]DX_i[)/doxygen_sqlite3.db \\
+ \$(DX_DOCDIR]DX_i[)/\$(PACKAGE).tag \\
+]])dnl
+[ -r \\
+ \$(DX_CLEAN_HTML) \\
+ \$(DX_CLEAN_CHM) \\
+ \$(DX_CLEAN_CHI) \\
+ \$(DX_CLEAN_MAN) \\
+ \$(DX_CLEAN_RTF) \\
+ \$(DX_CLEAN_XML) \\
+ \$(DX_CLEAN_PS) \\
+ \$(DX_CLEAN_PDF) \\
+ \$(DX_CLEAN_LATEX)"]],
+[[DX_SNIPPET_doc=""]])
+AC_SUBST([DX_RULES],
+["${DX_SNIPPET_doc}"])dnl
+AM_SUBST_NOTMAKE([DX_RULES])
+
+#For debugging:
+#echo DX_FLAG_doc=$DX_FLAG_doc
+#echo DX_FLAG_dot=$DX_FLAG_dot
+#echo DX_FLAG_man=$DX_FLAG_man
+#echo DX_FLAG_html=$DX_FLAG_html
+#echo DX_FLAG_chm=$DX_FLAG_chm
+#echo DX_FLAG_chi=$DX_FLAG_chi
+#echo DX_FLAG_rtf=$DX_FLAG_rtf
+#echo DX_FLAG_xml=$DX_FLAG_xml
+#echo DX_FLAG_pdf=$DX_FLAG_pdf
+#echo DX_FLAG_ps=$DX_FLAG_ps
+#echo DX_ENV=$DX_ENV
+])