# Copyright (C) 2000 Stefan Buehler # Patrick Eriksson # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AC_INIT(reconf) AM_CONFIG_HEADER(config.h) # The ARTS release number must go here: AM_INIT_AUTOMAKE(arts,0.0.218) # Maintainer mode switch. DOC++, as well as all LaTeX documents (DOC++ # and AUG) are only processed in maintainer mode. This is necessary so # that users who don't have LaTeX or DOC++ can install the package. # # Does not work this way, don't use. # # AM_MAINTAINER_MODE # C Compiler: AC_PROG_CC AC_PROG_CPP # C++ Compiler: AC_PROG_CXX # C++ Preprocessor: AC_PROG_CXXCPP # LF_CONFIGURE_CC # Configure the C++ Compiler # LF_CONFIGURE_CXX # LF_HOST_TYPE # Allow --with-warnings flag to configure: LF_SET_WARNINGS # Determine the name of the ranlib program AC_PROG_RANLIB # What's used by make install: AC_PROG_INSTALL # Provide standard headers: AC_STDC_HEADERS # Check compiler characteristics AC_C_INLINE AC_C_CONST AC_TYPE_SIZE_T AC_CHECK_SIZEOF(float) AC_CHECK_SIZEOF(double) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(size_t) # Special headers that we need: # AC_HAVE_HEADERS(getopt.h) (now included in the source) AC_CHECK_HEADER(math.h, , AC_MSG_ERROR(required header file missing)) # # Check for necessary functions in math library # for func in fabs exp asin sin cos sqrt do AC_CHECK_LIB(m, $func, , AC_MSG_ERROR(function $func not found in math library) ) done AC_CHECK_HEADER(hdf.h, , AC_MSG_ERROR(required header file missing)) AC_CHECK_LIB(mfhdf, Hopen, , AC_MSG_ERROR(HDF library not properly installed), -ldf -ljpeg -lz ) # # Default floating-point type # AC_ARG_WITH(numeric-type, [ --with-numeric-type=ARG Set floating-point type (default=double)], [case "${withval}" in double) ac_numeric_type=double ;; float) ac_numeric_type=float ;; *) AC_MSG_ERROR(bad value ${withval} for --with-numeric-type) ;; esac],[ ac_numeric_type=double ]) AC_MSG_RESULT(Setting floating-point type to $ac_numeric_type) AC_DEFINE_UNQUOTED(NUMERIC, $ac_numeric_type, Default floating-point type) # # Default integer type # AC_ARG_WITH(integer-type, [ --with-integer-type=ARG Set integer type (default=long)], [case "${withval}" in short) ac_integer_type=short ;; int) ac_integer_type=int ;; long) ac_integer_type=long ;; size_t) ac_integer_type=size_t ;; *) AC_MSG_ERROR(bad value ${withval} for --with-integer-type) ;; esac],[ ac_integer_type=long ]) AC_MSG_RESULT(Setting integer type to $ac_integer_type) AC_DEFINE_UNQUOTED(INDEX, $ac_integer_type, Default integer type) # This is needed to put the corrects data paths into the example files # in doc/examples: # # DOES NOT WORK! # #AC_SUBST (explicit_datadir) #explicit_datadir = 'hallo' # $datadir # # Enable/disable maintainer-mode # AC_MSG_CHECKING(whether maintainer-mode should be activated) AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode Activate maintainer-mode (default=no)], [case "${enableval}" in yes) ac_maintainer_mode=yes ;; no) ac_maintainer_mode=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-maintainer-mode) ;; esac],[ ac_maintainer_mode=no ]) AC_MSG_RESULT([$ac_maintainer_mode]) # # Toggle documentation # AC_MSG_CHECKING(whether documentation should be generated) AC_ARG_ENABLE(docs, [ --enable-docs Regenerate documentation (default=no)], [case "${enableval}" in yes) ac_docgen=yes ;; no) ac_docgen=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-docs) ;; esac],[ if test $ac_maintainer_mode = yes; then ac_docgen=yes; else ac_docgen=no; fi ]) AM_CONDITIONAL(ARTS_GENDOCS, test x$ac_docgen = xyes) AC_MSG_RESULT([$ac_docgen]) if test $ac_maintainer_mode = yes -a $ac_docgen = no; then AC_MSG_ERROR(Cannot deactivate documentation in maintainer-mode) fi # # Check for the required tools to build the docs # if test $ac_docgen = yes; then AC_CHECK_PROG(ac_doxygen, doxygen, yes, no) if test $ac_doxygen = no; then AC_MSG_ERROR(Doxygen is required to build the documentation - Get it from http://www.doxygen.org/) fi AC_CHECK_PROG(ac_latex, latex, yes, no) if test $ac_latex = no; then AC_MSG_ERROR(LaTeX is required to build the documentation!!!) fi AC_CHECK_PROG(ac_pdflatex, pdflatex, yes, no) if test $ac_pdflatex = no; then AC_MSG_ERROR(pdfLaTeX is required to build the documentation!!!) fi fi # Turn off optimization: (Leads to very long compilation times) if test $ac_maintainer_mode = yes; then # Turn on debugging CFLAGS="" CXXFLAGS="-g -ftemplate-depth-20" else CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS -ftemplate-depth-20" fi dnl Kicked out: dnl doc/doxygen/latex/Makefile dnl doc/doc++/Makefile dnl doc/doc++/html/Makefile dnl doc/doc++/tex/Makefile AC_OUTPUT( arts.spec Makefile ami/Makefile ami/arts/Makefile ami/file/Makefile ami/general/Makefile ami/hmatrix/Makefile ami/math/Makefile ami/path/Makefile ami/physics/Makefile ami/plot/Makefile ami/retrieval/Makefile aii/Makefile doc/Makefile doc/index.html doc/icons/Makefile doc/doxygen/Makefile doc/doxygen/Doxyfile doc/doxygen/html/Makefile doc/uguide/Makefile doc/uguide/auto_version.tex doc/uguide/Figs/Makefile doc/examples/Makefile doc/emacs/Makefile m4/Makefile src/Makefile ) AC_MSG_RESULT() AC_MSG_RESULT([*******************************************************]) AC_MSG_RESULT([ ARTS configuration summary]) AC_MSG_RESULT() AC_MSG_RESULT([ Maintainer mode : $ac_maintainer_mode]) AC_MSG_RESULT([ Floating-point type : $ac_numeric_type]) AC_MSG_RESULT([ Integer type : $ac_integer_type]) AC_MSG_RESULT([ Regenerate documentation : $ac_docgen]) AC_MSG_RESULT() AC_MSG_RESULT([ CPPFLAGS : $CPPFLAGS]) AC_MSG_RESULT([ CFLAGS : $CFLAGS]) AC_MSG_RESULT([ CXXFLAGS : $CXXFLAGS]) AC_MSG_RESULT() AC_MSG_RESULT([*******************************************************]) AC_MSG_RESULT()