working on autotools

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4273 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2010-04-21 04:49:32 +00:00
parent 9f60df9126
commit e96f30ec73
6 changed files with 65 additions and 65 deletions

View File

@ -1,10 +1,10 @@
# Subdirectories to descend into. # Subdirectories to descend into.
ACLOCAL_AMFLAGS = -I m4
if BUILD_FORTRAN
FORTRAN_DIRS = test if BUILD_FORTRAN
else FORTRAN_DIRS = test
FORTRAN_DIRS = else
endif FORTRAN_DIRS =
endif
SUBDIRS = src $(FORTRAN_DIRS) testcpp
ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src tests

View File

@ -1,49 +1,49 @@
# -*- Autoconf -*- # -*- Autoconf -*-
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64]) AC_PREREQ([2.64])
AC_INIT([IPhreeqc], [1.0], [charlton@usgs.gov]) AC_INIT([IPhreeqc], [1.0], [charlton@usgs.gov])
AC_CONFIG_AUX_DIR([config]) AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([src/IPhreeqc.cpp]) AC_CONFIG_SRCDIR([src/IPhreeqc.cpp])
# Checks for programs. # Checks for programs.
AC_PROG_CXX AC_PROG_CXX
# Check if the fortran interface should be included # Check if the fortran interface should be included
AC_MSG_CHECKING([if Fortran interface included]) AC_MSG_CHECKING([if Fortran interface included])
AC_ARG_ENABLE([fortran], AC_ARG_ENABLE([fortran],
[AC_HELP_STRING([--enable-fortran], [AC_HELP_STRING([--enable-fortran],
[include the Fortran interface @<:@default=yes@:>@])], [include the Fortran interface @<:@default=yes@:>@])],
[IPQ_FORTRAN=$enableval], [IPQ_FORTRAN=$enableval],
[IPQ_FORTRAN=yes]) [IPQ_FORTRAN=yes])
if test "X$IPQ_FORTRAN" = "Xyes"; then if test "X$IPQ_FORTRAN" = "Xyes"; then
echo "yes" echo "yes"
AC_PROG_FC AC_PROG_FC
AC_FC_LIBRARY_LDFLAGS AC_FC_LIBRARY_LDFLAGS
AC_FC_WRAPPERS AC_FC_WRAPPERS
AC_FC_MAIN AC_FC_MAIN
AC_SUBST(F77, $FC) AC_SUBST(F77, $FC)
AC_SUBST(FFLAGS, $FCFLAGS) AC_SUBST(FFLAGS, $FCFLAGS)
else else
echo "no" echo "no"
fi fi
AM_CONDITIONAL([BUILD_FORTRAN], [test "X$IPQ_FORTRAN" = "Xyes"]) AM_CONDITIONAL([BUILD_FORTRAN], [test "X$IPQ_FORTRAN" = "Xyes"])
# Disable shared library building by default (use --enable-shared to enable) # Disable shared library building by default (use --enable-shared to enable)
AC_DISABLE_SHARED AC_DISABLE_SHARED
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
# Checks for libraries. # Checks for libraries.
# Checks for header files. # Checks for header files.
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions. # Checks for library functions.
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile testcpp/Makefile]) AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile tests/phreeqc.dat tests/ex1 test/Makefile])
AC_OUTPUT AC_OUTPUT

View File

@ -1,7 +1,6 @@
#ifndef INC_IPHREEQC_H #ifndef INC_IPHREEQC_H
#define INC_IPHREEQC_H #define INC_IPHREEQC_H
#include <map>
#include "Var.h" #include "Var.h"
#if defined(_WINDLL) #if defined(_WINDLL)
@ -23,8 +22,6 @@ typedef enum {
} IPQ_RESULT; } IPQ_RESULT;
class IPhreeqc;
#if defined(__cplusplus) #if defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif

View File

@ -99,10 +99,12 @@ int IPhreeqc::output_handler(const int type, const char *err_str, const int stop
this->AddError("ERROR: "); this->AddError("ERROR: ");
this->AddError(err_str); this->AddError(err_str);
this->AddError("\n"); this->AddError("\n");
#if 0
if (stop == STOP) if (stop == STOP)
{ {
this->AddError("Stopping.\n"); this->AddError("Stopping.\n");
} }
#endif
} }
break; break;

View File

@ -43,7 +43,6 @@
SUBROUTINE OutputLastError(ID) SUBROUTINE OutputLastError(ID)
IMPLICIT NONE IMPLICIT NONE
INTEGER :: ID INTEGER :: ID
WRITE(*,*) "fortran OutputLastError ID = ", ID
CALL OutputLastErrorF(ID) CALL OutputLastErrorF(ID)
END SUBROUTINE OutputLastError END SUBROUTINE OutputLastError
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

View File

@ -1,7 +1,9 @@
#include "IPhreeqc.h"
#include "IPhreeqc.hpp"
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#include <map>
#include "IPhreeqc.h"
#include "IPhreeqc.hpp"
class IPhreeqcLib class IPhreeqcLib
{ {