From e96f30ec73979c58ed45524f783b0c6ac508f8f1 Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Wed, 21 Apr 2010 04:49:32 +0000 Subject: [PATCH] working on autotools git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4273 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- Makefile.am | 20 ++++----- configure.ac | 98 ++++++++++++++++++++++----------------------- include/IPhreeqc.h | 3 -- src/IPhreeqc.cpp | 2 + src/IPhreeqcF.f | 1 - src/IPhreeqcLib.cpp | 6 ++- 6 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Makefile.am b/Makefile.am index f41ea728..ea28810e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,10 @@ -# Subdirectories to descend into. - -if BUILD_FORTRAN - FORTRAN_DIRS = test -else - FORTRAN_DIRS = -endif - -SUBDIRS = src $(FORTRAN_DIRS) testcpp -ACLOCAL_AMFLAGS = -I m4 \ No newline at end of file +# Subdirectories to descend into. +ACLOCAL_AMFLAGS = -I m4 + +if BUILD_FORTRAN + FORTRAN_DIRS = test +else + FORTRAN_DIRS = +endif + +SUBDIRS = src tests diff --git a/configure.ac b/configure.ac index 06b5b2e3..9d666412 100644 --- a/configure.ac +++ b/configure.ac @@ -1,49 +1,49 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ([2.64]) -AC_INIT([IPhreeqc], [1.0], [charlton@usgs.gov]) -AC_CONFIG_AUX_DIR([config]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) -AC_CONFIG_SRCDIR([src/IPhreeqc.cpp]) - -# Checks for programs. -AC_PROG_CXX - -# Check if the fortran interface should be included -AC_MSG_CHECKING([if Fortran interface included]) -AC_ARG_ENABLE([fortran], - [AC_HELP_STRING([--enable-fortran], - [include the Fortran interface @<:@default=yes@:>@])], - [IPQ_FORTRAN=$enableval], - [IPQ_FORTRAN=yes]) - -if test "X$IPQ_FORTRAN" = "Xyes"; then - echo "yes" - AC_PROG_FC - AC_FC_LIBRARY_LDFLAGS - AC_FC_WRAPPERS - AC_FC_MAIN - AC_SUBST(F77, $FC) - AC_SUBST(FFLAGS, $FCFLAGS) -else - echo "no" -fi -AM_CONDITIONAL([BUILD_FORTRAN], [test "X$IPQ_FORTRAN" = "Xyes"]) - -# Disable shared library building by default (use --enable-shared to enable) -AC_DISABLE_SHARED -AC_PROG_LIBTOOL - -# Checks for libraries. - -# Checks for header files. - -# Checks for typedefs, structures, and compiler characteristics. - -# Checks for library functions. - -AC_CONFIG_FILES([Makefile src/Makefile test/Makefile testcpp/Makefile]) -AC_OUTPUT - +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.64]) +AC_INIT([IPhreeqc], [1.0], [charlton@usgs.gov]) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_CONFIG_SRCDIR([src/IPhreeqc.cpp]) + +# Checks for programs. +AC_PROG_CXX + +# Check if the fortran interface should be included +AC_MSG_CHECKING([if Fortran interface included]) +AC_ARG_ENABLE([fortran], + [AC_HELP_STRING([--enable-fortran], + [include the Fortran interface @<:@default=yes@:>@])], + [IPQ_FORTRAN=$enableval], + [IPQ_FORTRAN=yes]) + +if test "X$IPQ_FORTRAN" = "Xyes"; then + echo "yes" + AC_PROG_FC + AC_FC_LIBRARY_LDFLAGS + AC_FC_WRAPPERS + AC_FC_MAIN + AC_SUBST(F77, $FC) + AC_SUBST(FFLAGS, $FCFLAGS) +else + echo "no" +fi +AM_CONDITIONAL([BUILD_FORTRAN], [test "X$IPQ_FORTRAN" = "Xyes"]) + +# Disable shared library building by default (use --enable-shared to enable) +AC_DISABLE_SHARED +AC_PROG_LIBTOOL + +# Checks for libraries. + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. + +AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/phreeqc.dat tests/ex1 test/Makefile]) +AC_OUTPUT + diff --git a/include/IPhreeqc.h b/include/IPhreeqc.h index c2ea4491..8080b02a 100644 --- a/include/IPhreeqc.h +++ b/include/IPhreeqc.h @@ -1,7 +1,6 @@ #ifndef INC_IPHREEQC_H #define INC_IPHREEQC_H -#include #include "Var.h" #if defined(_WINDLL) @@ -23,8 +22,6 @@ typedef enum { } IPQ_RESULT; -class IPhreeqc; - #if defined(__cplusplus) extern "C" { #endif diff --git a/src/IPhreeqc.cpp b/src/IPhreeqc.cpp index 468925a0..62dc2b0f 100644 --- a/src/IPhreeqc.cpp +++ b/src/IPhreeqc.cpp @@ -99,10 +99,12 @@ int IPhreeqc::output_handler(const int type, const char *err_str, const int stop this->AddError("ERROR: "); this->AddError(err_str); this->AddError("\n"); +#if 0 if (stop == STOP) { this->AddError("Stopping.\n"); } +#endif } break; diff --git a/src/IPhreeqcF.f b/src/IPhreeqcF.f index 3a65885c..8cf6e3e3 100644 --- a/src/IPhreeqcF.f +++ b/src/IPhreeqcF.f @@ -43,7 +43,6 @@ SUBROUTINE OutputLastError(ID) IMPLICIT NONE INTEGER :: ID - WRITE(*,*) "fortran OutputLastError ID = ", ID CALL OutputLastErrorF(ID) END SUBROUTINE OutputLastError !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/src/IPhreeqcLib.cpp b/src/IPhreeqcLib.cpp index 1837cd94..ffae0891 100644 --- a/src/IPhreeqcLib.cpp +++ b/src/IPhreeqcLib.cpp @@ -1,7 +1,9 @@ -#include "IPhreeqc.h" -#include "IPhreeqc.hpp" #include #include +#include + +#include "IPhreeqc.h" +#include "IPhreeqc.hpp" class IPhreeqcLib {