Commit a18b0bda authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Autotools update.

parent b2ae926f
......@@ -58,6 +58,8 @@ AC_DEFUN([_ACX_CHECK_CFORTRAN_FC],
[ACX_MV_OBJ([conftest],[conftest_f])
save_LIBS=$LIBS
LIBS="conftest_c.$ac_objext conftest_f.$ac_objext $LIBS"
AS_CASE([$FC_FPP_FLAG],[-x\ f??-cpp-input],
[LIBS="-x none $LIBS"])
AC_RUN_IFELSE([AC_LANG_PROGRAM(,
[ USE conftest_data, ONLY: ri
IMPLICIT NONE
......@@ -142,6 +144,8 @@ AC_DEFUN([_ACX_CHECK_CFORTRAN_F77],
[ACX_MV_OBJ([conftest],[conftest_f])
save_LIBS=$LIBS
LIBS="conftest_c.$ac_objext conftest_f.$ac_objext $LIBS"
AS_CASE([$FC_FPP_FLAG],[-x\ f??-cpp-input],
[LIBS="-x none $LIBS"])
AC_RUN_IFELSE([AC_LANG_PROGRAM(,
[ REAL RI
COMMON /CFTSTD/ RI
......
......@@ -46,7 +46,7 @@ AC_DEFUN([ACX_PROG_FC_CHECK_FPP],dnl
m4_pushdef([acx_flags_var],m4_case(_AC_LANG,[Fortran],[FCFLAGS],[Fortran 77],[FFLAGS]))dnl
AC_CACHE_CHECK([for flag to enable preprocessing],[fpp_flag],
[]acx_flags_var[_save=$]acx_flags_var[
for i in none -cpp -fpp -qsuffix=cpp=f90 -eT -eZ -Mpreprocess ; do
for i in none -cpp -fpp -qsuffix=cpp=f90 -eT -eZ -Mpreprocess -x\ f95-cpp-input ; do
AS_IF([test "x$i" != xnone],
[]acx_flags_var[="$]acx_flags_var[ ${i}"])
AC_COMPILE_IFELSE([_ACX_SL_LANG_PROGRAM_FPP_ONLY],
......
......@@ -433,7 +433,7 @@ BEGIN {
while (<$preprocOutputFh>)
{
$p .= $_;
$preprocOutput .= $_ unless (m{^#});
$preprocOutput .= $_ if (rindex($_, '#', 0) && $_ ne "\n");
}
while (chomp($preprocOutput))
{
......
......@@ -90,7 +90,7 @@ sub buildNameSubst(\@);
sub parseSource($$;$);
my ($debug, $verbose, $dumpCppKeys) = (debugDefault(), 0, undef);
my (@includeDirs, %defines, @ignoredSysIncludes, @ignoredModules);
my (@includeDirs, %defines, @ignoredSysIncludes, %ignoredModules);
my ($objDepOut, $objectSuffix, $stripObjDirname) = (1, '.o', 0);
my (@depNameSubst, @moduleSearchPath);
my ($fcmodcase, $fcmodsuffix, $fcmodflag, $fcincflag, $fcdefopt, $fcundefopt)
......@@ -129,7 +129,7 @@ MakeDependsf90mod({ 'includePaths' => \@includeDirs,
'depNameSubst' => \@depNameSubst,
'stripObjDirname' => $stripObjDirname,
'ignoredSysIncludes' => \@ignoredSysIncludes,
'ignoredModules' => \@ignoredModules,
'ignoredModules' => \%ignoredModules,
'dumpCppKeys' => $dumpCppKeys,
'writePreprocessed' => $writePreprocessed,
'preprocNameSubst' => \@preprocNameSubst,
......@@ -146,7 +146,7 @@ sub uniq {
sub MakeDependsf90mod {
my (%moduleProvide, %incs, %sys_incs, %prg_incs, %moduleUse,
$objfile, @incDirs, @moduleDirs,
@ignoredSysIncludes, @ignoredModules, $globalDefines, $dumpCppKeys);
@ignoredSysIncludes, $ignoredModules, $globalDefines, $dumpCppKeys);
my %cppKeys;
my $optArgs = {};
my ($stripObjDirname, $writePreprocessed, $preprocNameSubst) = (0, 0);
......@@ -160,8 +160,8 @@ sub MakeDependsf90mod {
if (exists($optArgs->{'stripObjDirname'}));
@ignoredSysIncludes = @{$optArgs->{'ignoredSysIncludes'}}
if (exists($optArgs->{'ignoredSysIncludes'}));
@ignoredModules = @{$optArgs->{'ignoredModules'}}
if (exists($optArgs->{'ignoredModules'}));
$ignoredModules = exists($optArgs->{'ignoredModules'})
? $optArgs->{'ignoredModules'} : {};
$globalDefines = $optArgs->{'defines'}
if (exists($optArgs->{'defines'}));
$dumpCppKeys = exists($optArgs->{'dumpCppKeys'})?
......@@ -301,8 +301,8 @@ sub MakeDependsf90mod {
if (@{$incs{$srcfile}} + @{$moduleUse{$srcfile}}) {
{
my @notFound =
grep { my $module = $_; !exists $moduleProvide{$_}
and not grep { $module eq $_ } @ignoredModules }
grep { !exists $moduleProvide{$_}
and not exists($ignoredModules->{$_}) }
@{$moduleUse{$srcfile}};
hashMerge(%moduleProvide,
%{{searchModuleFile(\@moduleDirs, @notFound)}});
......@@ -792,6 +792,7 @@ sub buildNameSubst(\@)
(grep { ($seen[1] or /^--$/)?$seen[1]++:0 } @ARGV));
}
print(STDERR join(", ", @ARGV), "\n") if $debug > 2;
my @ignoredModules;
my $result
= $optionParser->getoptions('debug+' => \$debug,
'debug-cpp-pm+' => \$cpp::debug,
......@@ -829,6 +830,7 @@ sub buildNameSubst(\@)
'ignore-module=s' => \@ignoredModules,
'parse-cache=s' => \$parseCacheDB,
);
%ignoredModules = map { $_ => undef } @ignoredModules;
if($help or $usage)
{
pod2usage( {
......
......@@ -39,7 +39,7 @@
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <stdio.h>
......
......@@ -44,12 +44,16 @@
#define PPM_XFUNCS_INCLUDED
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#ifdef USE_MPI
# include <mpi.h>
#endif
#include "core/symprefix.h"
void *
......@@ -83,6 +87,17 @@ SymPrefix(xfputc)(int c, FILE *stream, const char *source, int line);
#define xfputc(c,stream) SymPrefix(xfputc)((c),(stream), __FILE__, __LINE__)
#ifdef USE_MPI
void
SymPrefix(xmpi)(int errcode, const char *source, int line);
#define xmpi(errcode) \
do { \
if (errcode == MPI_SUCCESS) ; else \
SymPrefix(xmpi)(errcode, __FILE__, __LINE__); \
} while (0)
#endif
#endif
/*
* Local Variables:
......
......@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <errno.h>
......
......@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
# include <config.h>
#endif
#include <errno.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment