mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-12 16:26:23 +00:00
Zoltan is added as thirdParty package
This commit is contained in:
50
thirdParty/Zoltan/config/ax_f90_module_case.m4
vendored
Normal file
50
thirdParty/Zoltan/config/ax_f90_module_case.m4
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
dnl Check case (upper or lower) of F90 module files.
|
||||
dnl Also checks module suffix, but we return only ax_cv_f90_modulecase.
|
||||
AC_DEFUN([AX_F90_MODULE_CASE],[
|
||||
AC_CACHE_CHECK([fortran 90 module file suffix and case],
|
||||
ax_cv_f90_modulecase,
|
||||
[
|
||||
rm -f conftest*
|
||||
cat >conftest.f <<EOF
|
||||
module conftest
|
||||
integer n
|
||||
parameter (n=1)
|
||||
end module conftest
|
||||
EOF
|
||||
# SGI and absoft compilers generates module name in upper case!
|
||||
testname="conftest"
|
||||
modcase="lower"
|
||||
echo "KDDKDD CASE 1" ${FC}
|
||||
if ${FC} -c conftest.f > conftest.out 2>&1 ; then
|
||||
FCMODSUFFIX=`ls conftest* | grep -v conftest.f | grep -v conftest.o`
|
||||
echo "KDDKDD CASE 2" ${FCMODSUFFIX}
|
||||
FCMODSUFFIX=`echo "${FCMODSUFFIX}" | sed -e 's/conftest\.//g'`
|
||||
if test -z "${FCMODSUFFIX}" ; then
|
||||
FCMODSUFFIX=`ls CONFTEST* 2>/dev/null \
|
||||
| grep -v CONFTEST.f | grep -v CONFTEST.o`
|
||||
FCMODSUFFIX=`echo "${FCMODSUFFIX}" | sed -e 's/CONFTEST\.//g'`
|
||||
if test -n "${FCMODSUFFIX}" ; then
|
||||
testname="CONFTEST"
|
||||
modcase="upper"
|
||||
fi
|
||||
fi
|
||||
if test -z "${FCMODSUFFIX}" ; then
|
||||
AC_MSG_RESULT(unknown)
|
||||
# Use mod if we can't figure it out
|
||||
FCMODSUFFIX="mod"
|
||||
else
|
||||
AC_MSG_RESULT(${FCMODSUFFIX})
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(unknown)
|
||||
fi
|
||||
#AC_SUBST(FCMODSUFFIX)
|
||||
AC_MSG_CHECKING(for case of module names)
|
||||
if test "${modcase}" = "lower" ; then
|
||||
AC_MSG_RESULT(lower)
|
||||
ax_cv_f90_modulecase="lower"
|
||||
else
|
||||
AC_MSG_RESULT(upper)
|
||||
ax_cv_f90_modulecase="upper"
|
||||
fi
|
||||
])])
|
67
thirdParty/Zoltan/config/ax_f90_module_flag.m4
vendored
Normal file
67
thirdParty/Zoltan/config/ax_f90_module_flag.m4
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
# ===========================================================================
|
||||
# http://www.nongnu.org/autoconf-archive/ax_f90_module_flag.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_F90_MODULE_FLAG
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Find Fortran 90 modules inclusion flag. The module inclusion flag is
|
||||
# stored in the cached variable ax_f90_modflag. An error is triggered if
|
||||
# the flag cannot be found. Supported are the -I GNU compilers flag, the
|
||||
# -M SUN compilers flag, and the -p Absoft Pro Fortran compiler flag.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Luc Maisonobe <luc@spaceroots.org>
|
||||
# Copyright (c) 2009 Julian C. Cummings <cummings@cacr.caltech.edu>
|
||||
# Copyright (c) 2009 Alexander Pletzer <pletzer@txcorp.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
AC_DEFUN([AX_F90_MODULE_FLAG],[
|
||||
AC_CACHE_CHECK([fortran 90 modules inclusion flag],
|
||||
ax_cv_f90_modflag,
|
||||
[AC_LANG_PUSH(Fortran)
|
||||
i=0
|
||||
while test \( -f tmpdir_$i \) -o \( -d tmpdir_$i \) ; do
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
mkdir tmpdir_$i
|
||||
cd tmpdir_$i
|
||||
AC_COMPILE_IFELSE([
|
||||
!234567
|
||||
module conftest_module
|
||||
contains
|
||||
subroutine conftest_routine
|
||||
write(*,'(a)') 'gotcha!'
|
||||
end subroutine conftest_routine
|
||||
end module conftest_module
|
||||
],[],[])
|
||||
cd ..
|
||||
ax_cv_f90_modflag="not found"
|
||||
for ax_flag in "-I " "-M" "-p"; do
|
||||
if test "$ax_cv_f90_modflag" = "not found" ; then
|
||||
ax_save_FCFLAGS="$FCFLAGS"
|
||||
FCFLAGS="$ax_save_FCFLAGS ${ax_flag}tmpdir_$i"
|
||||
AC_COMPILE_IFELSE([
|
||||
!234567
|
||||
program conftest_program
|
||||
use conftest_module
|
||||
call conftest_routine
|
||||
end program conftest_program
|
||||
],[ax_cv_f90_modflag="$ax_flag"],[])
|
||||
FCFLAGS="$ax_save_FCFLAGS"
|
||||
fi
|
||||
done
|
||||
rm -fr tmpdir_$i
|
||||
if test "$ax_cv_f90_modflag" = "not found" ; then
|
||||
AC_MSG_ERROR([unable to find compiler flag for modules inclusion])
|
||||
fi
|
||||
AC_LANG_POP(Fortran)
|
||||
])])
|
||||
|
310
thirdParty/Zoltan/config/compile
vendored
Executable file
310
thirdParty/Zoltan/config/compile
vendored
Executable file
@ -0,0 +1,310 @@
|
||||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-01-04.17; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
|
||||
# Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
lib=${1#-l}
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
set x "$@" "$dir/$lib.dll.lib"
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
set x "$@" "$dir/$lib.lib"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
test "$found" != yes && set x "$@" "$lib.lib"
|
||||
shift
|
||||
;;
|
||||
-L*)
|
||||
func_file_conv "${1#-L}"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
1522
thirdParty/Zoltan/config/config.guess
vendored
Executable file
1522
thirdParty/Zoltan/config/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1766
thirdParty/Zoltan/config/config.sub
vendored
Executable file
1766
thirdParty/Zoltan/config/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
688
thirdParty/Zoltan/config/depcomp
vendored
Executable file
688
thirdParty/Zoltan/config/depcomp
vendored
Executable file
@ -0,0 +1,688 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2011-12-04.11; # UTC
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
||||
# 2011 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add `dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mechanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test "$stat" = 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/ \1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/ /
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
88
thirdParty/Zoltan/config/generate-makeoptions.pl
vendored
Executable file
88
thirdParty/Zoltan/config/generate-makeoptions.pl
vendored
Executable file
@ -0,0 +1,88 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# This perl script graps a bunch of make macro definitions
|
||||
# generated for Teuchos that can be used in other makefiles.
|
||||
# This is dumped to stdout and can be redirected to build
|
||||
# a makefile.
|
||||
#
|
||||
# Note, this script must be maintained to be current for
|
||||
# the Teuchos makefile.
|
||||
#
|
||||
use strict;
|
||||
|
||||
if( !((@ARGV) && scalar(@ARGV)==2) ) {
|
||||
die "Error, this script takes two and only two arguments (makefile_name package_name).!\n";
|
||||
}
|
||||
|
||||
my $makefile_name = shift;
|
||||
my $package_name = shift;
|
||||
|
||||
#
|
||||
# List the macros you want to grep and include in the output
|
||||
#
|
||||
my @macros =
|
||||
(
|
||||
"CC"
|
||||
,"CXX"
|
||||
,"F77"
|
||||
,"FC"
|
||||
,"CXXLD"
|
||||
,"DEFS"
|
||||
,"CPPFLAGS"
|
||||
,"CFLAGS"
|
||||
,"CXXFLAGS"
|
||||
,"FFLAGS"
|
||||
,"FCFLAGS"
|
||||
,"LDFLAGS"
|
||||
,"FLIBS"
|
||||
,"BLAS_LIBS"
|
||||
,"LAPACK_LIBS"
|
||||
,"prefix"
|
||||
,"AR"
|
||||
,"ALTERNATE_AR"
|
||||
,"libteuchos_a_AR"
|
||||
,"RANLIB"
|
||||
);
|
||||
|
||||
open FILE_IN, "<$makefile_name" || die "The file $makefile_name could not be opended for input\n";
|
||||
my @makefile_name_array = <FILE_IN>;
|
||||
close FILE_IN;
|
||||
|
||||
#
|
||||
# Find the above macros and append "${package_name}_" to the beginning.
|
||||
#
|
||||
my @new_macros;
|
||||
my $add_next_line = 0;
|
||||
foreach( @makefile_name_array ) {
|
||||
my $line = $_;
|
||||
if($add_next_line) {
|
||||
push @new_macros, $line;
|
||||
if( substr($line,-1,1) eq "\\" ) {
|
||||
$add_next_line = 1;
|
||||
}
|
||||
else {
|
||||
$add_next_line = 0;
|
||||
}
|
||||
next;
|
||||
}
|
||||
#print "Line = $line";
|
||||
foreach( @macros ) {
|
||||
my $macro_search = "^${_} ";
|
||||
#print "Macro search = \'$macro_search\'\n";
|
||||
if( $line=~/$macro_search/ ) {
|
||||
#print "Adding Macro!\n";
|
||||
my $find_str = '\(CXX\)';
|
||||
my $replace_str = "(${package_name}_CXX)";
|
||||
$line=~s/$find_str/$replace_str/;
|
||||
push @new_macros, "${package_name}_${line}";
|
||||
if( substr($line,-2,1) eq "\\" ) {
|
||||
$add_next_line = 1;
|
||||
}
|
||||
else {
|
||||
$add_next_line = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print join("",@new_macros);
|
527
thirdParty/Zoltan/config/install-sh
vendored
Executable file
527
thirdParty/Zoltan/config/install-sh
vendored
Executable file
@ -0,0 +1,527 @@
|
||||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-01-19.21; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for `test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writeable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
331
thirdParty/Zoltan/config/missing
vendored
Executable file
331
thirdParty/Zoltan/config/missing
vendored
Executable file
@ -0,0 +1,331 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2012-01-06.13; # UTC
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run=:
|
||||
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
|
||||
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
|
||||
|
||||
# In the cases where this matters, `missing' is being run in the
|
||||
# srcdir already.
|
||||
if test -f configure.ac; then
|
||||
configure_ac=configure.ac
|
||||
else
|
||||
configure_ac=configure.in
|
||||
fi
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case $1 in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
--run try to run the given command, and emulate it if it fails
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
autom4te touch the output file, or create a stub one
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
help2man touch the output file
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
|
||||
\`g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# normalize program name to check for.
|
||||
program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program). This is about non-GNU programs, so use $1 not
|
||||
# $program.
|
||||
case $1 in
|
||||
lex*|yacc*)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case $program in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`${configure_ac}'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`acconfig.h' or \`${configure_ac}'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
|
||||
test -z "$files" && files="config.h"
|
||||
touch_files=
|
||||
for f in $files; do
|
||||
case $f in
|
||||
*:*) touch_files="$touch_files "`echo "$f" |
|
||||
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
|
||||
*) touch_files="$touch_files $f.in";;
|
||||
esac
|
||||
done
|
||||
touch $touch_files
|
||||
;;
|
||||
|
||||
automake*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print |
|
||||
sed 's/\.am$/.in/' |
|
||||
while read f; do touch "$f"; done
|
||||
;;
|
||||
|
||||
autom4te*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison*|yacc*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG=\${$#}
|
||||
case $LASTARG in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f y.tab.h; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if test ! -f y.tab.c; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex*|flex*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if test $# -ne 1; then
|
||||
eval LASTARG=\${$#}
|
||||
case $LASTARG in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if test -f "$SRCFILE"; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test ! -f lex.yy.c; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
help2man*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a dependency of a manual page. You may need the
|
||||
\`Help2man' package in order for those modifications to take
|
||||
effect. You can get \`Help2man' from any GNU archive site."
|
||||
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo ".ab help2man is required to generate this page"
|
||||
exit $?
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n "$sed_output"`
|
||||
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '
|
||||
/^@setfilename/{
|
||||
s/.* \([^ ]*\) *$/\1/
|
||||
p
|
||||
q
|
||||
}' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequisites for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
89
thirdParty/Zoltan/config/replace-install-prefix.pl
vendored
Executable file
89
thirdParty/Zoltan/config/replace-install-prefix.pl
vendored
Executable file
@ -0,0 +1,89 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
#
|
||||
# This script is called to do a set of text replacements for installing
|
||||
# a Makefile.export.package file so that external clients can use it.
|
||||
#
|
||||
# Read in commandline arguments
|
||||
#
|
||||
my $exec_prefix = ""; # [required] Abs path to base installation directory (i.e. --prefix=??? option passed to configure)
|
||||
my $my_export_makefile = ""; # [required] Name only of installed Makefile.export.package file
|
||||
my $my_top_srcdir = ""; # [required] Abs path to this package's top source directory
|
||||
my $my_incl_dirs = ""; # [required] Abs path to this package's include directories
|
||||
my $my_lib_dirs = ""; # [optional] Abs path to this package's library directories (if any exist)
|
||||
my $dep_package_builddirs = ""; # [optional] Abs paths to other directly dependent framework package build directories (if any exist)
|
||||
GetOptions(
|
||||
"exec-prefix=s" => \$exec_prefix,
|
||||
"my-export-makefile=s" => \$my_export_makefile,
|
||||
"my-abs-top-srcdir=s" => \$my_top_srcdir,
|
||||
"my-abs-incl-dirs=s" => \$my_incl_dirs,
|
||||
"my-abs-lib-dirs=s" => \$my_lib_dirs,
|
||||
"dep-package-abs-builddirs=s" => \$dep_package_builddirs
|
||||
);
|
||||
#
|
||||
# Validate commandline arguments
|
||||
#
|
||||
scalar(@ARGV) == 0 || die;
|
||||
$exec_prefix ne "" || die;
|
||||
$my_export_makefile ne "" || die;
|
||||
$my_top_srcdir ne "" || die;
|
||||
$my_incl_dirs ne "" || die;
|
||||
#
|
||||
# Interpret commandline arguments
|
||||
#
|
||||
$exec_prefix = remove_rel_paths($exec_prefix);
|
||||
my @my_incl_dirs = split(":",$my_incl_dirs);
|
||||
my @my_lib_dirs = split(":",$my_lib_dirs);
|
||||
my @dep_export_package_builddirs = split(":",$dep_package_builddirs);
|
||||
#
|
||||
# Do the replacements
|
||||
#
|
||||
my $my_abs_export_makefile = "${exec_prefix}/include/${my_export_makefile}";
|
||||
|
||||
my $cmnd_base = "${my_top_srcdir}/config/token-replace.pl ";
|
||||
#
|
||||
foreach(@dep_export_package_builddirs) {
|
||||
if($_ ne "") {
|
||||
run_cmnd($cmnd_base . "${_} ${exec_prefix}/include ${my_abs_export_makefile} ${my_abs_export_makefile}");
|
||||
}
|
||||
}
|
||||
#
|
||||
foreach(@my_incl_dirs) {
|
||||
if($_ ne "") {
|
||||
run_cmnd($cmnd_base . "-I${_} -I${exec_prefix}/include ${my_abs_export_makefile} ${my_abs_export_makefile}");
|
||||
}
|
||||
}
|
||||
#
|
||||
foreach(@my_lib_dirs) {
|
||||
if($_ ne "") {
|
||||
run_cmnd($cmnd_base . "-L${_} -L${exec_prefix}/lib ${my_abs_export_makefile} ${my_abs_export_makefile}");
|
||||
}
|
||||
}
|
||||
#
|
||||
run_cmnd($cmnd_base . "${my_top_srcdir}/config ${exec_prefix}/include ${my_abs_export_makefile} ${my_abs_export_makefile}");
|
||||
#
|
||||
# Subroutines
|
||||
#
|
||||
sub remove_rel_paths {
|
||||
my $entry_in = shift;
|
||||
if ($entry_in=~/-L\.\./) {
|
||||
return $entry_in;
|
||||
}
|
||||
my @paths = split("/",$entry_in);
|
||||
my @new_paths;
|
||||
foreach( @paths ) {
|
||||
if( !($_=~/\.\./) ) {
|
||||
push @new_paths, $_;
|
||||
}
|
||||
else {
|
||||
pop @new_paths
|
||||
}
|
||||
}
|
||||
return join("/",@new_paths);
|
||||
}
|
||||
sub run_cmnd {
|
||||
my $cmnd = shift;
|
||||
#print "\n", $cmnd, "\n";
|
||||
system($cmnd)==0 || die;
|
||||
}
|
43
thirdParty/Zoltan/config/string-replace.pl
vendored
Executable file
43
thirdParty/Zoltan/config/string-replace.pl
vendored
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# This perl script replaces a string with another string.
|
||||
# Here it is allowd for file_in and file_out to be the
|
||||
# same file.
|
||||
#
|
||||
use strict;
|
||||
#
|
||||
my $g_use_msg =
|
||||
"Use: string-replace.pl find_string replacement_string file_in file_out\n";
|
||||
if( scalar(@ARGV) < 4 ) {
|
||||
print STDERR $g_use_msg;
|
||||
exit(-1);
|
||||
}
|
||||
#
|
||||
my $find_string = shift;
|
||||
my $replacement_string = shift;
|
||||
my $file_in_name = shift;
|
||||
my $file_out_name = shift;
|
||||
#
|
||||
#
|
||||
if($file_in_name=~/CVS/) {
|
||||
# print "Do not replace in CVS\n";
|
||||
exit;
|
||||
}
|
||||
#
|
||||
open FILE_IN, "<$file_in_name" || die "The file $file_in_name could not be opended for input\n";
|
||||
my @file_in_array = <FILE_IN>;
|
||||
close FILE_IN;
|
||||
#
|
||||
my @file_out_array;
|
||||
my $did_replacement = 0;
|
||||
foreach(@file_in_array) {
|
||||
#print $_;
|
||||
$did_replacement = 1 if $_=~s/$find_string/$replacement_string/g;
|
||||
#print $_;
|
||||
push @file_out_array, $_;
|
||||
}
|
||||
if($did_replacement || $file_out_name ne $file_in_name) {
|
||||
open FILE_OUT, ">$file_out_name" || die "The file $file_out_name could not be opended for output\n";
|
||||
print FILE_OUT @file_out_array;
|
||||
close FILE_OUT;
|
||||
}
|
44
thirdParty/Zoltan/config/strip_dup_incl_paths.pl
vendored
Executable file
44
thirdParty/Zoltan/config/strip_dup_incl_paths.pl
vendored
Executable file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/perl -w
|
||||
# This perl script removes duplicate include paths left to the right
|
||||
use strict;
|
||||
my @all_incl_paths = @ARGV;
|
||||
my @cleaned_up_incl_paths;
|
||||
foreach( @all_incl_paths ) {
|
||||
$_ = remove_rel_paths($_);
|
||||
if( !($_=~/-I/) ) {
|
||||
push @cleaned_up_incl_paths, $_;
|
||||
}
|
||||
elsif( !entry_exists($_,\@cleaned_up_incl_paths) ) {
|
||||
push @cleaned_up_incl_paths, $_;
|
||||
}
|
||||
}
|
||||
print join( " ", @cleaned_up_incl_paths );
|
||||
#
|
||||
# Subroutines
|
||||
#
|
||||
sub entry_exists {
|
||||
my $entry = shift; # String
|
||||
my $list = shift; # Reference to an array
|
||||
foreach( @$list ) {
|
||||
if( $entry eq $_ ) { return 1; }
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#
|
||||
sub remove_rel_paths {
|
||||
my $entry_in = shift;
|
||||
if ($entry_in=~/-I\.\./) {
|
||||
return $entry_in;
|
||||
}
|
||||
my @paths = split("/",$entry_in);
|
||||
my @new_paths;
|
||||
foreach( @paths ) {
|
||||
if( !($_=~/\.\./) ) {
|
||||
push @new_paths, $_;
|
||||
}
|
||||
else {
|
||||
pop @new_paths
|
||||
}
|
||||
}
|
||||
return join("/",@new_paths);
|
||||
}
|
69
thirdParty/Zoltan/config/strip_dup_libs.pl
vendored
Executable file
69
thirdParty/Zoltan/config/strip_dup_libs.pl
vendored
Executable file
@ -0,0 +1,69 @@
|
||||
#!/usr/bin/perl -w
|
||||
# This perl script removes duplicate libraries from the right to the left and
|
||||
# removes duplicate -L library paths from the left to the right
|
||||
use strict;
|
||||
|
||||
my @all_libs = @ARGV;
|
||||
#
|
||||
# Move from left to right and remove duplicate -l libraries
|
||||
#
|
||||
my @cleaned_up_libs_first;
|
||||
foreach( reverse @all_libs ) {
|
||||
$_ = remove_rel_paths($_);
|
||||
if( $_=~/-L/ ) {
|
||||
unshift @cleaned_up_libs_first, $_;
|
||||
}
|
||||
else {
|
||||
if( !entry_exists($_,\@cleaned_up_libs_first) ) {
|
||||
unshift @cleaned_up_libs_first, $_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Move from right to left and remove duplicate -L library paths
|
||||
#
|
||||
my @cleaned_up_libs;
|
||||
foreach( @cleaned_up_libs_first ) {
|
||||
$_ = remove_rel_paths($_);
|
||||
if( !($_=~/-L/) ) {
|
||||
push @cleaned_up_libs, $_;
|
||||
}
|
||||
elsif( !entry_exists($_,\@cleaned_up_libs) ) {
|
||||
push @cleaned_up_libs, $_;
|
||||
}
|
||||
}
|
||||
#
|
||||
# Print the new list of libraries and paths
|
||||
#
|
||||
print join( " ", @cleaned_up_libs );
|
||||
|
||||
#
|
||||
# Subroutines
|
||||
#
|
||||
sub entry_exists {
|
||||
my $entry = shift; # String
|
||||
my $list = shift; # Reference to an array
|
||||
foreach( @$list ) {
|
||||
if( $entry eq $_ ) { return 1; }
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#
|
||||
sub remove_rel_paths {
|
||||
my $entry_in = shift;
|
||||
if ($entry_in=~/-L\.\./) {
|
||||
return $entry_in;
|
||||
}
|
||||
my @paths = split("/",$entry_in);
|
||||
my @new_paths;
|
||||
foreach( @paths ) {
|
||||
if( !($_=~/\.\./) ) {
|
||||
push @new_paths, $_;
|
||||
}
|
||||
else {
|
||||
pop @new_paths
|
||||
}
|
||||
}
|
||||
return join("/",@new_paths);
|
||||
}
|
67
thirdParty/Zoltan/config/tac_arg_check_mpi.m4
vendored
Normal file
67
thirdParty/Zoltan/config/tac_arg_check_mpi.m4
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
dnl @synopsis TAC_ARG_CHECK_MPI
|
||||
dnl
|
||||
dnl Check to make sure any definitions set in TAC_ARG_CONFIG_MPI
|
||||
dnl are valid, set the MPI flags. Test MPI compile using C++ compiler.
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_CHECK_MPI],
|
||||
[
|
||||
|
||||
if test "X${HAVE_PKG_MPI}" = "Xyes"; then
|
||||
|
||||
if test -n "${MPI_DIR}" && test -z "${MPI_INC}"; then
|
||||
MPI_INC="${MPI_DIR}/include"
|
||||
fi
|
||||
|
||||
if test -n "${MPI_INC}"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${MPI_INC}"
|
||||
fi
|
||||
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_MSG_CHECKING(for mpi.h)
|
||||
AC_TRY_CPP([#include "mpi.h"],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
echo "-----"
|
||||
echo "Cannot link simple MPI program."
|
||||
echo "Try --with-mpi-compilers to specify MPI compilers."
|
||||
echo "Or try --with-mpi-libs, --with-mpi-incdir, --with-mpi-libdir"
|
||||
echo "to specify all the specific MPI compile options."
|
||||
echo "-----"
|
||||
AC_MSG_ERROR(MPI cannot link)
|
||||
])
|
||||
|
||||
if test -n "${MPI_DIR}" && test -z "${MPI_LIBDIR}"; then
|
||||
MPI_LIBDIR="${MPI_DIR}/lib"
|
||||
fi
|
||||
|
||||
if test -n "${MPI_LIBDIR}"; then
|
||||
LDFLAGS="${LDFLAGS} -L${MPI_LIBDIR}"
|
||||
fi
|
||||
|
||||
if test -z "${MPI_LIBS}" && test -n "${MPI_LIBDIR}"; then
|
||||
MPI_LIBS="-lmpi"
|
||||
fi
|
||||
|
||||
if test -n "${MPI_LIBS}"; then
|
||||
LIBS="${MPI_LIBS} ${LIBS}"
|
||||
fi
|
||||
|
||||
# AC_LANG_CPLUSPLUS
|
||||
# AC_MSG_CHECKING(whether MPI will link using C++ compiler)
|
||||
# AC_TRY_LINK([#include <mpi.h>],
|
||||
# [int c; char** v; MPI_Init(&c,&v);],
|
||||
# [AC_MSG_RESULT(yes)],
|
||||
# [AC_MSG_RESULT(no)
|
||||
# echo "-----"
|
||||
# echo "Cannot link simple MPI program."
|
||||
# echo "Or try --with-mpi-libs, --with-mpi-incdir, --with-mpi-libdir"
|
||||
# echo "to specify all the specific MPI compile options."
|
||||
# echo "-----"
|
||||
# AC_MSG_ERROR(MPI cannot link)]
|
||||
# )
|
||||
|
||||
fi
|
||||
])
|
232
thirdParty/Zoltan/config/tac_arg_config_mpi.m4
vendored
Normal file
232
thirdParty/Zoltan/config/tac_arg_config_mpi.m4
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
dnl @synopsis TAC_ARG_CONFIG_MPI
|
||||
dnl
|
||||
dnl Test a variety of MPI options:
|
||||
dnl --enable-mpi - Turns MPI compiling mode on
|
||||
dnl --with-mpi - specify root directory of MPI
|
||||
dnl --with-mpi-compilers - Turns on MPI compiling mode and sets the MPI C++
|
||||
dnl compiler = mpicxx, mpic++ or mpiCC,
|
||||
dnl the MPI C compiler = mpicc and
|
||||
dnl the MPI Fortran compiler = mpif77
|
||||
dnl --with-mpi-incdir - specify include directory for MPI
|
||||
dnl --with-mpi-libs - specify MPI libraries
|
||||
dnl --with-mpi-libdir - specify location of MPI libraries
|
||||
dnl
|
||||
dnl If any of these options are set, HAVE_MPI will be defined for both
|
||||
dnl Autoconf and Automake, and HAVE_MPI will be defined in the
|
||||
dnl generated config.h file
|
||||
dnl
|
||||
dnl
|
||||
dnl @author Mike Heroux <maherou@sandia.gov>
|
||||
dnl Modified 12/26/2007 by Jim Willenbring to skip the Fortran compiler
|
||||
dnl check if Fortran is not enabled.
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_CONFIG_MPI],
|
||||
[
|
||||
|
||||
AC_ARG_ENABLE(mpi,
|
||||
[AC_HELP_STRING([--enable-mpi],[MPI support])],
|
||||
[HAVE_PKG_MPI=$enableval],
|
||||
[HAVE_PKG_MPI=yes]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi-compilers,
|
||||
[AC_HELP_STRING([--with-mpi-compilers=PATH],
|
||||
[use MPI compilers mpicc, mpif77, and mpicxx, mpic++ or mpiCC in the specified path or in the default path if no path is specified. Enables MPI])],
|
||||
[
|
||||
if test X${withval} != Xno; then
|
||||
HAVE_PKG_MPI=yes
|
||||
if test X${withval} = Xyes; then
|
||||
# Check for mpicxx, if it does not exist, check for mpic++, if it does
|
||||
# not exist, use mpiCC instead.
|
||||
AC_CHECK_PROG(MPI_TEMP_CXX, mpicxx, mpicxx, no)
|
||||
if test X${MPI_TEMP_CXX} = Xno; then
|
||||
AC_CHECK_PROG(MPI_CXX, mpic++, mpic++, mpiCC)
|
||||
else
|
||||
MPI_CXX=${MPI_TEMP_CXX}
|
||||
fi
|
||||
MPI_CC=mpicc
|
||||
MPI_F77=mpif77
|
||||
MPI_F90=mpif90
|
||||
else
|
||||
if test -f ${withval}/mpicxx; then
|
||||
MPI_CXX=${withval}/mpicxx
|
||||
elif test -f ${withval}/mpic++; then
|
||||
MPI_CXX=${withval}/mpic++
|
||||
else
|
||||
MPI_CXX=${withval}/mpiCC
|
||||
fi
|
||||
MPI_CC=${withval}/mpicc
|
||||
MPI_F77=${withval}/mpif77
|
||||
MPI_F90=${withval}/mpif90
|
||||
fi
|
||||
fi
|
||||
],
|
||||
[
|
||||
HAVE_PKG_MPI=yes
|
||||
# Check for mpicxx, if it does not exist, check for mpic++, if it does
|
||||
# not exist, use mpiCC instead.
|
||||
AC_CHECK_PROG(MPI_TEMP_CXX, mpicxx, mpicxx, no)
|
||||
if test X${MPI_TEMP_CXX} = Xno; then
|
||||
AC_CHECK_PROG(MPI_CXX, mpic++, mpic++, mpiCC)
|
||||
else
|
||||
MPI_CXX=${MPI_TEMP_CXX}
|
||||
fi
|
||||
MPI_CC=mpicc
|
||||
MPI_F77=mpif77
|
||||
MPI_F90=mpif90
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi,
|
||||
[AC_HELP_STRING([--with-mpi=MPIROOT],[use MPI root directory (enables MPI)])],
|
||||
[
|
||||
HAVE_PKG_MPI=yes
|
||||
MPI_DIR=${withval}
|
||||
AC_MSG_CHECKING(MPI directory)
|
||||
AC_MSG_RESULT([${MPI_DIR}])
|
||||
]
|
||||
)
|
||||
|
||||
#AC_ARG_WITH(mpi-include,
|
||||
#[AC_HELP_STRING([--with-mpi-include],[Obsolete. Use --with-mpi-incdir=DIR instead. Do not prefix DIR with '-I'.])],
|
||||
#[AC_MSG_ERROR([--with-mpi-include is an obsolte option. Use --with-mpi-incdir=DIR instead. Do not prefix DIR with '-I'. For example '--with-mpi-incdir=/usr/lam_path/include'.])]
|
||||
#)
|
||||
|
||||
AC_ARG_WITH(mpi-libs,
|
||||
[AC_HELP_STRING([--with-mpi-libs="LIBS"],[MPI libraries @<:@"-lmpi"@:>@])],
|
||||
[
|
||||
MPI_LIBS=${withval}
|
||||
AC_MSG_CHECKING(user-defined MPI libraries)
|
||||
AC_MSG_RESULT([${MPI_LIBS}])
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi-incdir,
|
||||
[AC_HELP_STRING([--with-mpi-incdir=DIR],[MPI include directory @<:@MPIROOT/include@:>@ Do not use -I])],
|
||||
[
|
||||
MPI_INC=${withval}
|
||||
AC_MSG_CHECKING(user-defined MPI includes)
|
||||
AC_MSG_RESULT([${MPI_INC}])
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi-libdir,
|
||||
[AC_HELP_STRING([--with-mpi-libdir=DIR],[MPI library directory @<:@MPIROOT/lib@:>@ Do not use -L])],
|
||||
[
|
||||
MPI_LIBDIR=${withval}
|
||||
AC_MSG_CHECKING(user-defined MPI library directory)
|
||||
AC_MSG_RESULT([${MPI_LIBDIR}])
|
||||
]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(whether we are using MPI)
|
||||
AC_MSG_RESULT([${HAVE_PKG_MPI}])
|
||||
|
||||
if test "X${HAVE_PKG_MPI}" = "Xyes"; then
|
||||
AC_DEFINE(HAVE_MPI,,[define if we want to use MPI])
|
||||
fi
|
||||
|
||||
dnl Define Automake version of HAVE_MPI if appropriate
|
||||
|
||||
AM_CONDITIONAL(HAVE_MPI, [test "X${HAVE_PKG_MPI}" = "Xyes"])
|
||||
|
||||
|
||||
dnl
|
||||
dnl --------------------------------------------------------------------
|
||||
dnl Check for MPI compilers (must be done *before* AC_PROG_CXX,
|
||||
dnl AC_PROG_CC and AC_PROG_F77)
|
||||
dnl
|
||||
dnl --------------------------------------------------------------------
|
||||
|
||||
if test "X$ac_cv_use_zoltan_cppdriver" = "Xyes"; then
|
||||
|
||||
if test -n "${MPI_CXX}"; then
|
||||
if test -f ${MPI_CXX}; then
|
||||
MPI_CXX_EXISTS=yes
|
||||
else
|
||||
AC_CHECK_PROG(MPI_CXX_EXISTS, ${MPI_CXX}, yes, no)
|
||||
fi
|
||||
|
||||
if test "X${MPI_CXX_EXISTS}" = "Xyes"; then
|
||||
CXX=${MPI_CXX}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI C++ compiler ${MPI_CXX}."
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH"
|
||||
echo "or specify a C++ compiler using CXX=<compiler>"
|
||||
echo "Do not use --with-mpi-compilers if using CXX=<compiler>"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI C++ compiler (${MPI_CXX}) not found.])
|
||||
fi
|
||||
fi
|
||||
|
||||
fi dnl ac_cv_use_zoltan_cppdriver
|
||||
|
||||
if test -n "${MPI_CC}"; then
|
||||
if test -f ${MPI_CC}; then
|
||||
MPI_CC_EXISTS=yes
|
||||
else
|
||||
AC_CHECK_PROG(MPI_CC_EXISTS, ${MPI_CC}, yes, no)
|
||||
fi
|
||||
|
||||
if test "X${MPI_CC_EXISTS}" = "Xyes"; then
|
||||
CC=${MPI_CC}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI C compiler ${MPI_CC}."
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH"
|
||||
echo "or specify a C compiler using CC=<compiler>"
|
||||
echo "Do not use --with-mpi-compilers if using CC=<compiler>"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI C compiler (${MPI_CC}) not found.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$ac_cv_use_fortran" = "Xyes"; then
|
||||
|
||||
if test -n "${MPI_F77}"; then
|
||||
if test -f ${MPI_F77}; then
|
||||
MPI_F77_EXISTS=yes
|
||||
else
|
||||
AC_CHECK_PROG(MPI_F77_EXISTS, ${MPI_F77}, yes, no)
|
||||
fi
|
||||
|
||||
if test "X${MPI_F77_EXISTS}" = "Xyes"; then
|
||||
F77=${MPI_F77}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI Fortran compiler ${MPI_F77}."
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH"
|
||||
echo "or specify a Fortran 77 compiler using F77=<compiler>"
|
||||
echo "Do not use --with-mpi-compilers if using F77=<compiler>"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI Fortran 77 compiler (${MPI_F77}) not found.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$ac_cv_use_fortran90" = "Xyes"; then
|
||||
|
||||
if test -n "${MPI_F90}"; then
|
||||
if test -f ${MPI_F90}; then
|
||||
MPI_F90_EXISTS=yes
|
||||
else
|
||||
AC_CHECK_PROG(MPI_F90_EXISTS, ${MPI_F90}, yes, no)
|
||||
fi
|
||||
|
||||
if test "X${MPI_F90_EXISTS}" = "Xyes"; then
|
||||
FC=${MPI_F90}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI Fortran compiler ${MPI_F90}."
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH"
|
||||
echo "or specify a Fortran compiler using FC=<compiler>"
|
||||
echo "Do not use --with-mpi-compilers if using FC=<compiler>"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI Fortran compiler (${MPI_F90}) not found.])
|
||||
fi
|
||||
fi
|
||||
|
||||
fi dnl ac_cv_use_fortran90
|
||||
|
||||
fi dnl ac_cv_use_fortran
|
||||
])
|
76
thirdParty/Zoltan/config/tac_arg_enable_export-makefiles.m4
vendored
Normal file
76
thirdParty/Zoltan/config/tac_arg_enable_export-makefiles.m4
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
dnl Enables export makefile specific code
|
||||
dnl
|
||||
dnl The following AM_CONDITIONALS are set for makefiles to access:
|
||||
dnl USING_EXPORT_MAKEFILES
|
||||
dnl USING_PERL via TAC_ARG_WITH_PERL
|
||||
dnl USING_GNUMAKE
|
||||
dnl
|
||||
dnl The following AC_DEFINES are set:
|
||||
dnl HAVE_EXPORT_MAKEFILES
|
||||
dnl
|
||||
dnl the following variables are set:
|
||||
dnl PERL_EXE for the perl executable via TAC_ARG_WITH_PERL
|
||||
dnl
|
||||
dnl This file was based on tac_arg_enable_feature.m4 by Mike Heroux
|
||||
dnl @author Roger Pawlowski <rppawlo@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_ENABLE_EXPORT_MAKEFILES],
|
||||
[
|
||||
AC_ARG_ENABLE(export-makefiles,
|
||||
AC_HELP_STRING([--enable-export-makefiles],[Creates export makefiles in the install (prefix) directory. This option requires perl to be set in your path or defined with --with-perl=<perl executable>. Note that the export makefiles are always created and used in the build directory, but will not be installable without this option to change the paths. (default is $1)]),
|
||||
ac_cv_use_export_makefiles=$enableval,
|
||||
ac_cv_use_export_makefiles=$1)
|
||||
|
||||
AC_MSG_CHECKING(whether to build export makefiles)
|
||||
|
||||
if test "X$ac_cv_use_export_makefiles" != "Xno"; then
|
||||
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_EXPORT_MAKEFILES],,[Define if you want to build export makefiles.])
|
||||
|
||||
else
|
||||
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USING_EXPORT_MAKEFILES, test X${ac_cv_use_export_makefiles} = Xyes)
|
||||
|
||||
# Check for perl to run scripts (Required dependency)
|
||||
TAC_ARG_WITH_PERL
|
||||
|
||||
if test "X$HAVE_PERL" != "Xyes" &&
|
||||
test "X$ac_cv_use_export_makefiles" != "Xno"; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([Failed to find the perl executable. The flag --enable-export-makefiles requires perl to be either in your path or explicitly defined by the flag --with-perl=<executable>. If you do not require the export makefiles to be installed via 'make install', you can disable the export makefiles with --disable-export-makefiles.])
|
||||
fi
|
||||
|
||||
# Check for using gnumake to clean up link lines via
|
||||
# gnumake's "shell" command. Optional dependency.
|
||||
AC_DEFUN([TAC_ARG_WITH_GNUMAKE],
|
||||
[
|
||||
AC_ARG_WITH(gnumake,
|
||||
AC_HELP_STRING([--with-gnumake],[Gnu's make has special functions we can use to eliminate redundant paths in the build and link lines. Enable this if you use gnu-make to build Trilinos. This requires that perl is in your path or that you have specified the perl executable with --with-perl=<perl executable>. Configure will check for the existence of the perl executable and quit with an error if it is not found. (default is no)]),
|
||||
ac_cv_use_gnumake=$withval, ac_cv_use_gnumake=no)
|
||||
|
||||
AC_MSG_CHECKING(whether gnumake specific code should be enabled)
|
||||
|
||||
if test "X$ac_cv_use_gnumake" != "Xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_GNUMAKE],,[Define if you are using gnumake - this will shorten your link lines.])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AM_CONDITIONAL(USING_GNUMAKE, test "X$ac_cv_use_gnumake" = "Xyes")
|
||||
])
|
||||
|
||||
TAC_ARG_WITH_GNUMAKE
|
||||
|
||||
if test "X$HAVE_PERL" != "Xyes" &&
|
||||
test "X$ac_cv_use_gnumake" != "Xno"; then
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([The flag --with-gnumake requires perl to be in your path. The perl executable can alternatively be explicitly defined by the flag --with-perl=<executable>.])
|
||||
fi
|
||||
|
||||
])
|
||||
|
40
thirdParty/Zoltan/config/tac_arg_enable_feature.m4
vendored
Normal file
40
thirdParty/Zoltan/config/tac_arg_enable_feature.m4
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
dnl @synopsis TAC_ARG_ENABLE_FEATURE(FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME, DEFAULT_VAL)
|
||||
dnl
|
||||
dnl Test for --enable-${FEATURE_NAME} and set to DEFAULT_VAL value if feature not specified.
|
||||
dnl Also calls AC_DEFINE to define HAVE_${HAVE_NAME} if value is not equal to "no"
|
||||
dnl
|
||||
dnl Use this macro to help defining whether or not optional
|
||||
dnl features* should compiled. For example:
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_FEATURE(epetra, [Configure and build epetra], EPETRA, yes)
|
||||
dnl
|
||||
dnl will test for --enable-epetra when configure is run. If it is defined
|
||||
dnl and not set to "no" or not defined (default is "yes") then HAVE_EPETRA will
|
||||
dnl be defined, if --enable-epetra is defined to be "no", HAVE_EPETRA will not
|
||||
dnl be defined.
|
||||
dnl
|
||||
dnl *NOTE: epetra, aztecoo, komplex, ifpack, and other software found in
|
||||
dnl subdirectories of Trilinos/packages are "packages" in their own right.
|
||||
dnl However, these packages are also "features" of the larger package
|
||||
dnl "Trilinos". Therefore, when configuring from the Trilinos directory,
|
||||
dnl it is appropriate to refer to these software packages as "features".
|
||||
dnl
|
||||
dnl This file was based on tac_arg_with_package.m4 by Mike Heroux
|
||||
dnl @author James Willenbring <jmwille@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_ENABLE_FEATURE],
|
||||
[
|
||||
AC_ARG_ENABLE([$1],
|
||||
AC_HELP_STRING([--enable-$1],[$2 (default is [$4])]),
|
||||
ac_cv_use_$1=$enableval, ac_cv_use_$1=$4)
|
||||
|
||||
AC_MSG_CHECKING(whether to use [$1])
|
||||
|
||||
if test "X$ac_cv_use_$1" != "Xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_$3],,[Define if want to build $1])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
52
thirdParty/Zoltan/config/tac_arg_enable_feature_sub.m4
vendored
Normal file
52
thirdParty/Zoltan/config/tac_arg_enable_feature_sub.m4
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
dnl @synopsis TAC_ARG_ENABLE_FEATURE_SUB(FEATURE_NAME, SUB_FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME, DEFAULT_VAL)
|
||||
dnl
|
||||
dnl This hack gets around the fact that TAC_ARG_ENABLE_FEATURE does not support underscores
|
||||
dnl in its feature names. TAC_ARG_ENABLE_FEATURE_SUB allows exactly one underscore. Not great,
|
||||
dnl but arguably better than supporting no underscores.
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_FEATURE(feature-sub, [Configure and build feature-sub], FEATURE_SUB, yes)
|
||||
dnl fails because tac_arg_enable_feature tests for ac_cv_use_feature-sub which gets
|
||||
dnl rejected because the `-' is not allowed in variables. (AC_ARG_ENABLE sets ac_cv_use_feature_sub
|
||||
dnl to avoid this problem.) Use:
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_FEATURE(feature, sub, [Configure and build feature-sub], FEATURE_SUB, yes)
|
||||
dnl instead.
|
||||
dnl
|
||||
dnl Test for --enable-${FEATURE_NAME} and set to DEFAULT_VAL value if feature not specified.
|
||||
dnl Also calls AC_DEFINE to define HAVE_${HAVE_NAME} if value is not equal to "no"
|
||||
dnl
|
||||
dnl Use this macro to help defining whether or not optional
|
||||
dnl features* should compiled. For example:
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_FEATURE(epetra, [Configure and build epetra], EPETRA, yes)
|
||||
dnl
|
||||
dnl will test for --enable-epetra when configure is run. If it is defined
|
||||
dnl and not set to "no" or not defined (default is "yes") then HAVE_EPETRA will
|
||||
dnl be defined, if --enable-epetra is defined to be "no", HAVE_EPETRA will not
|
||||
dnl be defined.
|
||||
dnl
|
||||
dnl *NOTE: epetra, aztecoo, komplex, ifpack, and other software found in
|
||||
dnl subdirectories of Trilinos/packages are "packages" in their own right.
|
||||
dnl However, these packages are also "features" of the larger package
|
||||
dnl "Trilinos". Therefore, when configuring from the Trilinos directory,
|
||||
dnl it is appropriate to refer to these software packages as "features".
|
||||
dnl
|
||||
dnl This file was based on tac_arg_enable_package.m4 by Jim Willenbring
|
||||
dnl @author Ken Stanley <ksstanl@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_ENABLE_FEATURE_SUB],
|
||||
[
|
||||
AC_ARG_ENABLE([$1-$2],
|
||||
AC_HELP_STRING([--enable-$1-$2],[$3 (default is [$5])]),
|
||||
ac_cv_use_$1_$2=$enableval, ac_cv_use_$1_$2=$5)
|
||||
|
||||
AC_MSG_CHECKING(whether to use [$1-$2])
|
||||
|
||||
if test "X$ac_cv_use_$1_$2" != "Xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_$4],,[Define if want to build $1-$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
54
thirdParty/Zoltan/config/tac_arg_enable_feature_sub_check.m4
vendored
Executable file
54
thirdParty/Zoltan/config/tac_arg_enable_feature_sub_check.m4
vendored
Executable file
@ -0,0 +1,54 @@
|
||||
dnl @synopsis TAC_ARG_ENABLE_FEATURE_SUB_CHECK(FEATURE_NAME, SUB_FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME)
|
||||
dnl
|
||||
dnl This hack gets around the fact that TAC_ARG_ENABLE_FEATURE does not support underscores
|
||||
dnl in its feature names. TAC_ARG_ENABLE_FEATURE_SUB_CHECK allows exactly one underscore. Not great,
|
||||
dnl but arguably better than supporting no underscores.
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_FEATURE(feature-sub, [Configure and build feature-sub], FEATURE_SUB, yes)
|
||||
dnl fails because tac_arg_enable_feature tests for ac_cv_use_feature-sub which gets
|
||||
dnl rejected because the `-' is not allowed in variables. (AC_ARG_ENABLE sets ac_cv_use_feature_sub
|
||||
dnl to avoid this problem.) Use:
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_FEATURE_SUB_CHECK(feature, sub, [Configure and build feature-sub], FEATURE_SUB)
|
||||
dnl instead.
|
||||
dnl
|
||||
dnl This macro will test for --enable-${FEATURE_NAME}-${SUB_FEATURE_NAME} when configure is run.
|
||||
dnl If it is defined and not set to "no" or not defined and --disable-${SUB_FEATURE_NAME} is not
|
||||
dnl specified then HAVE_${HAVE_NAME} will be defined.
|
||||
dnl
|
||||
dnl *NOTE: This macro is designed for the use-case when there is an individual Trilinos package
|
||||
dnl offering fine-grained control of a Trilinos option. This way, the individual package
|
||||
dnl option is enabled, as long as the Trilinos option is not disabled. If the Trilinos option is
|
||||
dnl disabled, then the user must enable each packages option individually. For instance:
|
||||
dnl
|
||||
dnl --disable-tests --enable-teuchos-tests
|
||||
dnl
|
||||
dnl *NOTE: epetra, aztecoo, komplex, ifpack, and other software found in
|
||||
dnl subdirectories of Trilinos/packages are "packages" in their own right.
|
||||
dnl However, these packages are also "features" of the larger package
|
||||
dnl "Trilinos". Therefore, when configuring from the Trilinos directory,
|
||||
dnl it is appropriate to refer to these software packages as "features".
|
||||
dnl
|
||||
dnl This file was based on tac_arg_enable_package.m4 by Jim Willenbring
|
||||
dnl and tac_arg_enable_package_sub.m4 by Ken Stanley.
|
||||
dnl
|
||||
dnl @author Heidi Thornquist <hkthorn@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_ENABLE_FEATURE_SUB_CHECK],
|
||||
[
|
||||
AC_ARG_ENABLE([$2],, ac_cv_use_$2=$enableval, ac_cv_use_$2=yes)
|
||||
|
||||
AC_ARG_ENABLE([$1-$2],
|
||||
AC_HELP_STRING([--enable-$1-$2],[$3 (default is yes if --disable-$2 is not specified)]),
|
||||
ac_cv_use_$1_$2=$enableval, ac_cv_use_$1_$2=${ac_cv_use_$2})
|
||||
|
||||
AC_MSG_CHECKING(whether to use [$1-$2])
|
||||
|
||||
if test "X$ac_cv_use_$1_$2" != "Xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_$4],,[Define if want to build $1-$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
30
thirdParty/Zoltan/config/tac_arg_enable_option.m4
vendored
Normal file
30
thirdParty/Zoltan/config/tac_arg_enable_option.m4
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
dnl @synopsis TAC_ARG_ENABLE_OPTION(FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME, DEFAULT_VAL)
|
||||
dnl
|
||||
dnl Test for --enable-${FEATURE_NAME} and set to DEFAULT_VAL value if feature not specified.
|
||||
dnl Also calls AC_DEFINE to define HAVE_${HAVE_NAME} if value is not equal to "no"
|
||||
dnl
|
||||
dnl Use this macro to facilitate definition of options in a package. For example:
|
||||
dnl
|
||||
dnl TAC_ARG_ENABLE_OPTION(threads, [enable shared memory threads], THREADS, no)
|
||||
dnl
|
||||
dnl will test for --enable-threads when configure is run. If it is defined (and not set to "no")
|
||||
dnl then HAVE_THREADS will be defined, Otherwise HAVE_THREADS will not be defined.
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_ENABLE_OPTION],
|
||||
[
|
||||
AC_ARG_ENABLE([$1],
|
||||
AC_HELP_STRING([--enable-$1],[$2 (default is [$4])]),
|
||||
ac_cv_use_$1=$enableval, ac_cv_use_$1=$4)
|
||||
|
||||
AC_MSG_CHECKING(whether to use [$1])
|
||||
|
||||
if test "X$ac_cv_use_$1" != "Xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_$3],1,[Define if want to build with $1 enabled])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
17
thirdParty/Zoltan/config/tac_arg_with_3pl_sub.m4
vendored
Normal file
17
thirdParty/Zoltan/config/tac_arg_with_3pl_sub.m4
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
dnl @synopsis TAC_ARG_WITH_3PL_SUB( VALUE_NAME, VALUE_SUB_NAME, VALUE_DESCRIPTION)
|
||||
dnl
|
||||
dnl Test for --with-${VALUE_NAME}-${VALUE_SUB_NAME} and set to no if value not specified.
|
||||
dnl
|
||||
dnl Use this macro to set variables, such as library names and include paths, which
|
||||
dnl include an underscore.
|
||||
dnl
|
||||
dnl This file was based on tac_arg_with_sub.m4 by Ken Stanley
|
||||
dnl @author Jim Willenbring <jmwille@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_3PL_SUB],
|
||||
[
|
||||
AC_ARG_WITH([$1-$2],
|
||||
AC_HELP_STRING([--with-$1-$2],[$3]),
|
||||
tac_with_$1_$2=$withval, tac_with_$1_$2=no)
|
||||
])
|
||||
|
39
thirdParty/Zoltan/config/tac_arg_with_ar.m4
vendored
Normal file
39
thirdParty/Zoltan/config/tac_arg_with_ar.m4
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
dnl @synopsis TAC_ARG_WITH_AR
|
||||
dnl
|
||||
dnl Test for --with-ar="ar_program ar_flags".
|
||||
dnl Default is "ar cru"
|
||||
dnl
|
||||
dnl Generates an Automake conditional USE_ALTERNATE_AR that can be tested.
|
||||
dnl Generates the user-specified archiver command in @ALTERNATE_AR@.
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_AR],
|
||||
[
|
||||
AC_ARG_WITH(ar,
|
||||
AC_HELP_STRING([--with-ar], [override archiver command (default is "ar cru")]),
|
||||
[
|
||||
AC_MSG_CHECKING(user-defined archiver)
|
||||
AC_MSG_RESULT([${withval}])
|
||||
USE_ALTERNATE_AR=yes
|
||||
ALTERNATE_AR="${withval}"
|
||||
]
|
||||
)
|
||||
|
||||
if test -n "${SPECIAL_AR}" && test "X${USE_ALTERNATE_AR}" != "Xyes";
|
||||
then
|
||||
USE_ALTERNATE_AR=yes
|
||||
ALTERNATE_AR="${SPECIAL_AR}"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for special archiver command)
|
||||
if test "X${USE_ALTERNATE_AR}" = "Xyes"; then
|
||||
AC_MSG_RESULT([${ALTERNATE_AR}])
|
||||
AM_CONDITIONAL(USE_ALTERNATE_AR, true)
|
||||
else
|
||||
AC_MSG_RESULT([none])
|
||||
AM_CONDITIONAL(USE_ALTERNATE_AR, false)
|
||||
fi
|
||||
AC_SUBST(ALTERNATE_AR)
|
||||
])
|
||||
|
31
thirdParty/Zoltan/config/tac_arg_with_flags.m4
vendored
Normal file
31
thirdParty/Zoltan/config/tac_arg_with_flags.m4
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
dnl @synopsis TAC_ARG_WITH_FLAGS(lcase_name, UCASE_NAME)
|
||||
dnl
|
||||
dnl Test for --with-lcase_name="compiler/loader flags". if defined, prepend
|
||||
dnl flags to standard UCASE_NAME definition.
|
||||
dnl
|
||||
dnl Use this macro to facilitate additional special flags that should be
|
||||
dnl passed on to the preprocessor/compilers/loader.
|
||||
dnl
|
||||
dnl Example use
|
||||
dnl
|
||||
dnl TAC_ARG_WITH_FLAGS(cxxflags, CXXFLAGS)
|
||||
dnl
|
||||
dnl tests for --with-cxxflags and pre-pends to CXXFLAGS
|
||||
dnl
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_FLAGS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether additional [$2] flags should be added])
|
||||
AC_ARG_WITH($1,
|
||||
AC_HELP_STRING([--with-$1],
|
||||
[additional [$2] flags to be added: will prepend to [$2]]),
|
||||
[
|
||||
$2="${withval} ${$2}"
|
||||
AC_MSG_RESULT([$2 = ${$2}])
|
||||
],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
])
|
||||
|
27
thirdParty/Zoltan/config/tac_arg_with_incdirs.m4
vendored
Normal file
27
thirdParty/Zoltan/config/tac_arg_with_incdirs.m4
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
dnl @synopsis TAC_ARG_WITH_INCDIRS
|
||||
dnl
|
||||
dnl Test for --with-incdirs="-Iincdir1 -Iincdir2". if defined, prepend
|
||||
dnl "-Iincdir1 -Iincdir2" to CPPFLAGS
|
||||
dnl
|
||||
dnl Use this macro to facilitate addition of directories to include file search path.
|
||||
dnl
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_INCDIRS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether additional include search paths defined])
|
||||
AC_ARG_WITH(incdirs,
|
||||
AC_HELP_STRING([--with-incdirs],
|
||||
[additional directories containing include files: will prepend to search here for includes, use -Idir format]),
|
||||
[
|
||||
CPPFLAGS="${withval} ${CPPFLAGS}"
|
||||
CFLAGS="${withval} ${CFLAGS}"
|
||||
FCFLAGS="${withval} ${FCFLAGS}"
|
||||
FFLAGS="${withval} ${FFLAGS}"
|
||||
AC_MSG_RESULT([${withval}])
|
||||
],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
])
|
||||
|
24
thirdParty/Zoltan/config/tac_arg_with_libdirs.m4
vendored
Normal file
24
thirdParty/Zoltan/config/tac_arg_with_libdirs.m4
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
dnl @synopsis TAC_ARG_WITH_LIBDIRS
|
||||
dnl
|
||||
dnl Test for --with-libdirs="-Llibdir1 -Llibdir2". if defined,
|
||||
dnl prepend "-Llibdir1 -Llibdir2" to LDFLAGS
|
||||
dnl
|
||||
dnl Use this macro to facilitate addition of directories to library search path.
|
||||
dnl
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_LIBDIRS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether additional library search paths defined])
|
||||
AC_ARG_WITH(libdirs,
|
||||
AC_HELP_STRING([--with-libdirs],
|
||||
[OBSOLETE use --with-ldflags instead. (ex. --with-ldflags="-L<DIR> -L<DIR2>")]),
|
||||
[
|
||||
LDFLAGS="${withval} ${LDFLAGS}"
|
||||
AC_MSG_RESULT([${withval}])
|
||||
],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
])
|
||||
|
30
thirdParty/Zoltan/config/tac_arg_with_libs.m4
vendored
Normal file
30
thirdParty/Zoltan/config/tac_arg_with_libs.m4
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
dnl @synopsis TAC_ARG_WITH_LIBS
|
||||
dnl
|
||||
dnl Test for --with-libs="name(s)".
|
||||
dnl
|
||||
dnl Prepends the specified name(s) to the list of libraries to link
|
||||
dnl with.
|
||||
dnl
|
||||
dnl Example use
|
||||
dnl
|
||||
dnl TAC_ARG_WITH_LIBS
|
||||
dnl
|
||||
dnl tests for --with-libs and pre-pends to LIBS
|
||||
dnl
|
||||
dnl @author Jim Willenbring <jmwille@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_LIBS],
|
||||
[
|
||||
AC_MSG_CHECKING([whether additional libraries are needed])
|
||||
AC_ARG_WITH(libs,
|
||||
AC_HELP_STRING([--with-libs],
|
||||
[List additional libraries here. For example, --with-libs=-lsuperlu
|
||||
or --with-libs=/path/libsuperlu.a]),
|
||||
[
|
||||
LIBS="${withval} ${LIBS}"
|
||||
AC_MSG_RESULT([LIBS = ${LIBS}])
|
||||
],
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
]
|
||||
)
|
32
thirdParty/Zoltan/config/tac_arg_with_package.m4
vendored
Normal file
32
thirdParty/Zoltan/config/tac_arg_with_package.m4
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
dnl @synopsis TAC_ARG_WITH_PACKAGE(FEATURE_NAME, FEATURE_DESCRIPTION, HAVE_NAME, DEFAULT_VAL)
|
||||
dnl
|
||||
dnl Test for --with-${FEATURE_NAME} and set to DEFAULT_VAL value if feature not specified.
|
||||
dnl Also calls AC_DEFINE to define HAVE_${HAVE_NAME} if value is not equal to "no"
|
||||
dnl
|
||||
dnl Use this macro to help defining whether or not interfaces for optional
|
||||
dnl package should compiled. For example:
|
||||
dnl
|
||||
dnl TAC_ARG_WITH_PACKAGE(zoltan, [Enable Zoltan interface support], ZOLTAN, no)
|
||||
dnl
|
||||
dnl will test for --with-zoltan when configure is run. If it is defined
|
||||
dnl (and not set to "no") then HAVE_ZOLTAN will be defined,
|
||||
dnl Otherwise HAVE_ZOLTAN will not be defined.
|
||||
dnl
|
||||
dnl @author Mike Heroux <mheroux@cs.sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_PACKAGE],
|
||||
[
|
||||
AC_ARG_WITH([$1],
|
||||
AC_HELP_STRING([--with-$1],[$2 (default is [$4])]),
|
||||
ac_cv_use_$1=$withval, ac_cv_use_$1=$4)
|
||||
|
||||
AC_MSG_CHECKING(whether to use [$1])
|
||||
|
||||
if test "X$ac_cv_use_$1" != "Xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([HAVE_$3],,[Define if want to build with $1 enabled])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
|
34
thirdParty/Zoltan/config/tac_arg_with_perl.m4
vendored
Normal file
34
thirdParty/Zoltan/config/tac_arg_with_perl.m4
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
dnl @synopsis TAC_ARG_WITH_PERL(DEFAULT_VAL)
|
||||
dnl
|
||||
dnl Test for --enable-gnumake and set to DEFAULT_VAL value if feature not specified.
|
||||
dnl Calls AC_DEFINE to define HAVE_GNUMAKE if value is not equal to "no"
|
||||
dnl Calls AM_CONDITIONAL to define USING_GNUMAKE to true/false.
|
||||
dnl
|
||||
dnl This file was based on tac_arg_with_ar.m4 by Mike Heroux
|
||||
dnl @author Roger Pawlowski <rppawlo@sandia.gov>
|
||||
dnl
|
||||
AC_DEFUN([TAC_ARG_WITH_PERL],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(perl,
|
||||
AC_HELP_STRING([--with-perl], [supply a perl executable. For example --with-perl=/usr/bin/perl.]),
|
||||
[
|
||||
AC_MSG_CHECKING(for user supplied perl executable)
|
||||
AC_MSG_RESULT([${withval}])
|
||||
USER_SPECIFIED_PERL=yes
|
||||
PERL_EXE="${withval}"
|
||||
],
|
||||
[
|
||||
USER_SPECIFIED_PERL=no
|
||||
])
|
||||
|
||||
if test "X${USER_SPECIFIED_PERL}" = "Xyes"; then
|
||||
AC_CHECK_FILE(${PERL_EXE}, [HAVE_PERL=yes], [HAVE_PERL=no])
|
||||
AC_SUBST(PERL_EXE, ${PERL_EXE})
|
||||
else
|
||||
AC_CHECK_PROG(HAVE_PERL, perl, yes, no)
|
||||
AC_SUBST(PERL_EXE, perl)
|
||||
fi
|
||||
AM_CONDITIONAL(USING_PERL, test X${HAVE_PERL} = Xyes)
|
||||
])
|
||||
|
43
thirdParty/Zoltan/config/token-replace.pl
vendored
Executable file
43
thirdParty/Zoltan/config/token-replace.pl
vendored
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# This perl script replaces a string with another string
|
||||
# on a token basis. Here it is allowed for file_in and
|
||||
# file_out to be the same file.
|
||||
#
|
||||
use strict;
|
||||
#
|
||||
my $g_use_msg =
|
||||
"Use: token-replace.pl find_token replacement_token file_in file_out\n";
|
||||
if( scalar(@ARGV) < 4 ) {
|
||||
print STDERR $g_use_msg;
|
||||
exit(-1);
|
||||
}
|
||||
#
|
||||
my $find_token = shift;
|
||||
my $replacement_token = shift;
|
||||
my $file_in_name = shift;
|
||||
my $file_out_name = shift;
|
||||
#
|
||||
#print "file_in_name = $file_in_name\n";
|
||||
if($file_in_name=~/CVS/) {
|
||||
# print "Do not replace in CVS\n";
|
||||
exit;
|
||||
}
|
||||
open FILE_IN, "<$file_in_name" || die "The file $file_in_name could not be opended for input\n";
|
||||
my @file_in_array = <FILE_IN>;
|
||||
close FILE_IN;
|
||||
#
|
||||
my $match_str = '([^\w\d_]|^)' . $find_token . '([^\w\d_]|$)';
|
||||
#print $match_str . "\n";
|
||||
#
|
||||
my @file_out_array;
|
||||
my $did_replacement = 0;
|
||||
foreach(@file_in_array) {
|
||||
$did_replacement = 1 if $_=~s/$match_str/$1$replacement_token$2/g;
|
||||
push @file_out_array, $_;
|
||||
}
|
||||
if($did_replacement || $file_out_name ne $file_in_name) {
|
||||
open FILE_OUT, ">$file_out_name" || die "The file $file_out_name could not be opended for output\n";
|
||||
print FILE_OUT @file_out_array;
|
||||
close FILE_OUT;
|
||||
}
|
104
thirdParty/Zoltan/config/wk_fc_get_vendor.m4
vendored
Normal file
104
thirdParty/Zoltan/config/wk_fc_get_vendor.m4
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
dnl Determine F90 vendor and version string.
|
||||
AC_DEFUN([WK_FC_GET_VENDOR],
|
||||
[AC_CACHE_CHECK([the compiler ID],
|
||||
[wk_cv_prog_f90_version_string],
|
||||
[$FC -version >conftest.log 2>&1
|
||||
$FC -V >>conftest.log 2>&1
|
||||
$FC --version >>conftest.log 2>&1
|
||||
|
||||
wk_grep_f90_NAG=`grep NAG conftest.log | head -1`
|
||||
wk_grep_f90_Compaq=`grep Compaq conftest.log | head -1`
|
||||
wk_grep_f90_Digital=`grep DIGITAL conftest.log | head -1`
|
||||
wk_grep_f90_SGI=`grep MIPS conftest.log | head -1`
|
||||
wk_grep_f90_Intel=`grep 'Intel(R)' conftest.log | head -1`
|
||||
wk_grep_f90_Sun=`grep 'Sun' conftest.log | head -1`
|
||||
wk_grep_f90_Lahey=`grep 'Lahey' conftest.log | head -1`
|
||||
wk_grep_f90_PGI=`grep 'pgf' conftest.log | head -1`
|
||||
wk_grep_f90_G95=`grep -i 'g95' conftest.log | grep -i 'gcc' | head -1`
|
||||
wk_grep_f90_GFORTRAN=`grep -i 'GNU Fortran' conftest.log | head -1`
|
||||
wk_grep_f90_Absoft=`grep -i 'Absoft' conftest.log | head -1`
|
||||
|
||||
if test -n "$wk_grep_f90_NAG"; then
|
||||
wk_cv_prog_f90_type="NAG"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_NAG
|
||||
wk_cv_prog_f90_version=[`echo $wk_cv_prog_f90_version_string | sed -e 's/.* Release \([0-9][0-9]*\.[0-9][0-9]*.*$\)/\1/'`]
|
||||
wk_cv_prog_f90_major_version=[`echo $wk_cv_prog_f90_version | sed -e 's/\([0-9][0-9]*\)\..*/\1/'`]
|
||||
elif test -n "$wk_grep_f90_Compaq"; then
|
||||
wk_cv_prog_f90_type="Compaq"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_Compaq
|
||||
elif test -n "$wk_grep_f90_Digital"; then
|
||||
wk_cv_prog_f90_type="DEC"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_Digital
|
||||
elif test -n "$wk_grep_f90_SGI"; then
|
||||
wk_cv_prog_f90_type="SGI"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_SGI
|
||||
elif test -n "$wk_grep_f90_Intel"; then
|
||||
wk_cv_prog_f90_type="Intel"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_Intel
|
||||
wk_cv_prog_f90_version=[`echo $wk_cv_prog_f90_version_string | sed -e 's/.* Version \([0-9][0-9]*\.[0-9][0-9]*\) .*/\1/'`]
|
||||
wk_cv_prog_f90_major_version=[`echo $wk_cv_prog_f90_version | sed -e 's/\([0-9][0-9]*\)\..*/\1/'`]
|
||||
elif test -n "$wk_grep_f90_Sun"; then
|
||||
wk_cv_prog_f90_type="Sun"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_Sun
|
||||
wk_cv_prog_f90_version=[`echo $wk_cv_prog_f90_version_string | sed -e 's/.* Fortran 95 \([0-9][0-9]*\.[0-9][0-9]*\) .*/\1/'`]
|
||||
wk_cv_prog_f90_major_version=[`echo $wk_cv_prog_f90_version | sed -e 's/\([0-9][0-9]*\)\..*/\1/'`]
|
||||
elif test -n "$wk_grep_f90_Lahey"; then
|
||||
wk_cv_prog_f90_type="Lahey"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_Lahey
|
||||
elif test -n "$wk_grep_f90_PGI"; then
|
||||
wk_cv_prog_f90_type="PGI"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_PGI
|
||||
elif test -n "$wk_grep_f90_G95"; then
|
||||
wk_cv_prog_f90_type="G95"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_G95
|
||||
elif test -n "$wk_grep_f90_GFORTRAN"; then
|
||||
wk_cv_prog_f90_type="GNU"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_GFORTRAN
|
||||
wk_cv_prog_f90_version=[`echo $wk_cv_prog_f90_version_string | sed -e 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'`]
|
||||
wk_cv_prog_f90_major_version=[`echo $wk_cv_prog_f90_version | sed -e 's/\([0-9][0-9]*\)\..*/\1/'`]
|
||||
elif test -n "$wk_grep_f90_Absoft"; then
|
||||
wk_cv_prog_f90_type="Absoft"
|
||||
wk_cv_prog_f90_version_string=$wk_grep_f90_Absoft
|
||||
else
|
||||
wk_cv_prog_f90_type="unknown"
|
||||
wk_cv_prog_f90_version_string="unknown"
|
||||
fi
|
||||
|
||||
rm -f conftest.log
|
||||
|
||||
]) dnl end AC_CACHE_CHECK
|
||||
|
||||
dnl Vendor-specific variables:
|
||||
AC_CACHE_CHECK([the compiler vendor], [wk_cv_prog_f90_type])
|
||||
|
||||
if test -n "$wk_cv_prog_f90_version"; then
|
||||
AC_CACHE_CHECK([the compiler version], [wk_cv_prog_f90_version])
|
||||
else
|
||||
wk_cv_prog_f90_version=$wk_cv_prog_f90_version_string
|
||||
fi
|
||||
|
||||
if test -n "$wk_cv_prog_f90_major_version"; then
|
||||
AC_CACHE_CHECK([the compiler major version], [wk_cv_prog_f90_major_version])
|
||||
else
|
||||
wk_cv_prog_f90_major_version=$wk_cv_prog_f90_version
|
||||
fi
|
||||
|
||||
FC_VERSION_STRING=$wk_cv_prog_f90_version_string
|
||||
FC_VENDOR=$wk_cv_prog_f90_type
|
||||
FC_VERSION=$wk_cv_prog_f90_version
|
||||
FC_MAJOR_VERSION=$wk_cv_prog_f90_major_version
|
||||
AC_SUBST(FC_VERSION_STRING)
|
||||
AC_SUBST(FC_VENDOR)
|
||||
AC_SUBST(FC_VERSION)
|
||||
AC_SUBST(FC_MAJOR_VERSION)
|
||||
|
||||
dnl Module names: (all compilers apparently have converged to '.mod')
|
||||
dnl The perl scripts need a quoted version of this
|
||||
FC_MODNAME='$(1:.o=.mod)'
|
||||
FC_MODNAME_Q='\$(1:.o=.mod)'
|
||||
AC_SUBST(FC_MODNAME)
|
||||
AC_SUBST(FC_MODNAME_Q)
|
||||
|
||||
]) dnl end AC_DEFUN
|
||||
|
||||
|
279
thirdParty/Zoltan/config/zac_arg_config_mpi.m4
vendored
Normal file
279
thirdParty/Zoltan/config/zac_arg_config_mpi.m4
vendored
Normal file
@ -0,0 +1,279 @@
|
||||
dnl @synopsis ZAC_ARG_CONFIG_MPI
|
||||
dnl
|
||||
dnl Test a variety of MPI options:
|
||||
dnl --enable-mpi - Turns MPI compiling mode on
|
||||
dnl --with-mpi - specify root directory of MPI
|
||||
dnl --with-mpi-compilers - Turns on MPI compiling mode and sets the MPI C++
|
||||
dnl compiler C, and Fortran
|
||||
dnl --with-mpi-incdir - specify include directory for MPI
|
||||
dnl --with-mpi-libs - specify MPI libraries
|
||||
dnl --with-mpi-libdir - specify location of MPI libraries
|
||||
dnl
|
||||
dnl If any of these options are set, HAVE_MPI will be defined for both
|
||||
dnl Autoconf and Automake, and HAVE_MPI will be defined in the
|
||||
dnl generated config.h file
|
||||
dnl
|
||||
dnl if --disable-mpi, then Zoltan will build serial MPI.
|
||||
dnl
|
||||
dnl --enable-mpi and --with-mpi-compilers are the default.
|
||||
dnl
|
||||
dnl --without-mpi is actually a user error, but we'll interpret it as --disable-mpi
|
||||
dnl
|
||||
dnl If CC, CXX, F77 and/or F90/FTN/FC have been set by the user, and MPI compilers
|
||||
dnl are desired, these will be assumed to be the MPI compilers.
|
||||
dnl
|
||||
dnl This was adapted from the Trilinos TAC_ARG_CONFIG_MPI.
|
||||
dnl
|
||||
AC_DEFUN([ZAC_ARG_CONFIG_MPI],
|
||||
[
|
||||
|
||||
HAVE_PKG_MPI=unset
|
||||
SEEK_MPI_COMPILERS=unset
|
||||
MPI_COMPILER_PATH=unset
|
||||
|
||||
AC_ARG_ENABLE(mpi,
|
||||
[AC_HELP_STRING([--enable-mpi],[enable MPI support])],
|
||||
[
|
||||
if test X${enableval} = Xno; then
|
||||
HAVE_PKG_MPI=no
|
||||
else
|
||||
HAVE_PKG_MPI=yes
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi,
|
||||
[AC_HELP_STRING([--with-mpi=MPIROOT],[the MPI root directory (above bin,lib,include), enables MPI])],
|
||||
[
|
||||
if test X${withval} = Xno; then
|
||||
HAVE_PKG_MPI=no
|
||||
else
|
||||
HAVE_PKG_MPI=yes
|
||||
if test X${withval} != Xyes; then
|
||||
MPI_DIR=${withval}
|
||||
fi
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi-compilers,
|
||||
[AC_HELP_STRING([--with-mpi-compilers={yes/no/path}],[Find MPI compilers/Don't use MPI compilers/Find MPI compilers in path])],
|
||||
[
|
||||
HAVE_PKG_MPI=yes
|
||||
if test X${withval} = Xno; then
|
||||
SEEK_MPI_COMPILERS=no
|
||||
else
|
||||
SEEK_MPI_COMPILERS=yes
|
||||
if test X${withval} != Xyes; then
|
||||
MPI_COMPILER_PATH=${withval}
|
||||
fi
|
||||
fi
|
||||
],
|
||||
[
|
||||
if test X${HAVE_PKG_MPI} != Xno; then
|
||||
SEEK_MPI_COMPILERS=yes
|
||||
HAVE_PKG_MPI=yes
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
dnl Using MPI is the default
|
||||
|
||||
if test X${HAVE_PKG_MPI} = unset ; then
|
||||
HAVE_PKG_MPI=yes
|
||||
fi
|
||||
|
||||
if test X${SEEK_MPI_COMPILERS} = Xyes; then
|
||||
|
||||
if test X${MPI_COMPILER_PATH} != Xunset ; then
|
||||
# MPI_SEEK_PATH=$MPI_COMPILER_PATH$PATH_SEPARATOR$PATH
|
||||
MPI_SEEK_PATH=$MPI_COMPILER_PATH
|
||||
elif test -n "${MPI_DIR}" ; then
|
||||
# MPI_SEEK_PATH=$MPI_DIR/bin$PATH_SEPARATOR$PATH
|
||||
MPI_SEEK_PATH=$MPI_DIR/bin
|
||||
else
|
||||
MPI_SEEK_PATH=$PATH
|
||||
fi
|
||||
|
||||
dnl Find C MPI compiler if MPI_CC is not already defined
|
||||
|
||||
if test -z "${MPI_CC}"; then
|
||||
if test -f "${CC}"; then
|
||||
|
||||
MPI_CC=${CC}
|
||||
|
||||
else
|
||||
|
||||
if test -n "${CC}" ; then
|
||||
MPI_CC_CANDIDATE=${CC}
|
||||
else
|
||||
MPI_CC_CANDIDATE=mpicc
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(MPI_CC, ${MPI_CC_CANDIDATE}, [notFound], [PATH = ${MPI_SEEK_PATH}])
|
||||
|
||||
if test "${MPI_CC}" != "notFound" ; then
|
||||
CC=${MPI_CC}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI C compiler in " ${MPI_SEEK_PATH}
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH,"
|
||||
echo "or specify a path to top mpi directory (above bin) with --with-mpi=PATH,"
|
||||
echo "or specify a C compiler using CC=<compiler>"
|
||||
echo "or --disable-mpi"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI C compiler not found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "X$ac_cv_use_zoltan_cppdriver" = "Xyes"; then
|
||||
dnl Find C++ MPI compiler if MPI_CXX is not already defined
|
||||
|
||||
if test -z "${MPI_CXX}"; then
|
||||
|
||||
if test -f "${CXX}"; then
|
||||
|
||||
MPI_CXX=${CXX}
|
||||
|
||||
else
|
||||
|
||||
if test -n "${CXX}" ; then
|
||||
MPI_CXX_CANDIDATES=${CXX}
|
||||
else
|
||||
MPI_CXX_CANDIDATES="[mpicxx mpic++ mpiCC]"
|
||||
fi
|
||||
|
||||
AC_PATH_PROGS(MPI_CXX, ${MPI_CXX_CANDIDATES}, [notFound], [PATH = ${MPI_SEEK_PATH}])
|
||||
|
||||
if test "${MPI_CXX}" != "notFound" ; then
|
||||
CXX=${MPI_CXX}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI C++ compiler in " ${MPI_SEEK_PATH}
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH,"
|
||||
echo "or specify a path to top mpi directory (above bin) with --with-mpi=PATH,"
|
||||
echo "or specify a C++ compiler using CXX=<compiler>"
|
||||
echo "or --disable-mpi"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI C++ compiler not found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# if test "X$ac_cv_use_fortran" = "Xyes"; then
|
||||
# dnl Find a Fortran 77 MPI compiler if MPI_F77 is not already defined
|
||||
#
|
||||
# if test -z "${MPI_F77}"; then
|
||||
# MPI_F77_CANDIDATE=mpif77
|
||||
# if test -n "${F77}"; then
|
||||
# MPI_F77_CANDIDATE=${F77}
|
||||
# fi
|
||||
#
|
||||
# AC_PATH_PROG(MPI_F77, ${MPI_F77_CANDIDATE}, [notFound], [PATH = ${MPI_SEEK_PATH}])
|
||||
#
|
||||
# if test "${MPI_F77}" != "notFound" ; then
|
||||
# F77=${MPI_F77}
|
||||
# else
|
||||
# echo "-----"
|
||||
# echo "Cannot find MPI Fortan 77 compiler."
|
||||
# echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH,"
|
||||
# echo "or specify a path to top mpi directory (above bin) with --with-mpi=PATH,"
|
||||
# echo "or specify a fortran 77 compiler using F77=<compiler>"
|
||||
# echo "-----"
|
||||
# AC_MSG_ERROR([MPI C compiler not found.])
|
||||
# fi
|
||||
# fi
|
||||
# fi
|
||||
|
||||
if test "X$ac_cv_use_fortran90" = "Xyes"; then
|
||||
dnl Find a Fortran 90 MPI compiler if MPI_F90 is not already defined
|
||||
|
||||
if test -z "${MPI_FC}"; then
|
||||
|
||||
if test -f "${FC}"; then
|
||||
|
||||
MPI_FC=${FC}
|
||||
|
||||
else
|
||||
MPI_FC_CANDIDATES=""
|
||||
|
||||
if test -n "${FC}"; then
|
||||
MPI_FC_CANDIDATES=${FC}
|
||||
elif test -n "${FTN}"; then
|
||||
MPI_FC_CANDIDATES=${FTN}
|
||||
elif test -n "${F90}"; then
|
||||
MPI_FC_CANDIDATES=${F90}
|
||||
fi
|
||||
|
||||
if test -n "${MPI_FC_CANDIDATES}" && test -f ${MPI_FC_CANDIDATES} ; then
|
||||
MPI_FC=${MPI_FC_CANDIDATES}
|
||||
else
|
||||
if test -z "${MPI_FC_CANDIDATES}"; then
|
||||
MPI_FC_CANDIDATES="[mpif90 mpif77]"
|
||||
fi
|
||||
|
||||
AC_PATH_PROGS(MPI_FC, ${MPI_FC_CANDIDATES}, [notFound], [PATH = ${MPI_SEEK_PATH}])
|
||||
|
||||
if test "${MPI_FC}" != "notFound" ; then
|
||||
FC=${MPI_FC}
|
||||
else
|
||||
echo "-----"
|
||||
echo "Cannot find MPI Fortran 90 compiler in " ${MPI_SEEK_PATH}
|
||||
echo "Specify a path to all mpi compilers with --with-mpi-compilers=PATH,"
|
||||
echo "or specify a path to top mpi directory (above bin) with --with-mpi=PATH,"
|
||||
echo "or specify a fortran 90 compiler using FC=<compiler>"
|
||||
echo "-----"
|
||||
AC_MSG_ERROR([MPI C compiler not found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#AC_ARG_WITH(mpi-include,
|
||||
#[AC_HELP_STRING([--with-mpi-include],[Obsolete. Use --with-mpi-incdir=DIR instead. Do not prefix DIR with '-I'.])],
|
||||
#[AC_MSG_ERROR([--with-mpi-include is an obsolte option. Use --with-mpi-incdir=DIR instead. Do not prefix DIR with '-I'. For example '--with-mpi-incdir=/usr/lam_path/include'.])]
|
||||
#)
|
||||
|
||||
AC_ARG_WITH(mpi-libs,
|
||||
[AC_HELP_STRING([--with-mpi-libs="LIBS"],[MPI libraries @<:@"-lmpi"@:>@])],
|
||||
[
|
||||
MPI_LIBS=${withval}
|
||||
AC_MSG_CHECKING(user-defined MPI libraries)
|
||||
AC_MSG_RESULT([${MPI_LIBS}])
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi-incdir,
|
||||
[AC_HELP_STRING([--with-mpi-incdir=DIR],[MPI include directory @<:@MPIROOT/include@:>@ Do not use -I])],
|
||||
[
|
||||
MPI_INC=${withval}
|
||||
AC_MSG_CHECKING(user-defined MPI includes)
|
||||
AC_MSG_RESULT([${MPI_INC}])
|
||||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(mpi-libdir,
|
||||
[AC_HELP_STRING([--with-mpi-libdir=DIR],[MPI library directory @<:@MPIROOT/lib@:>@ Do not use -L])],
|
||||
[
|
||||
MPI_LIBDIR=${withval}
|
||||
AC_MSG_CHECKING(user-defined MPI library directory)
|
||||
AC_MSG_RESULT([${MPI_LIBDIR}])
|
||||
]
|
||||
)
|
||||
|
||||
AC_MSG_CHECKING(whether we are using MPI)
|
||||
AC_MSG_RESULT([${HAVE_PKG_MPI}])
|
||||
|
||||
if test "X${HAVE_PKG_MPI}" = "Xyes"; then
|
||||
AC_DEFINE(HAVE_MPI,,[define if we want to use MPI])
|
||||
fi
|
||||
|
||||
dnl Define Automake version of HAVE_MPI if appropriate
|
||||
|
||||
AM_CONDITIONAL(HAVE_MPI, [test "X${HAVE_PKG_MPI}" = "Xyes"])
|
||||
|
||||
])
|
39
thirdParty/Zoltan/config/zac_arg_with_id.m4
vendored
Normal file
39
thirdParty/Zoltan/config/zac_arg_with_id.m4
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
dnl @synopsis ZAC_ARG_WITH_ID
|
||||
dnl
|
||||
dnl Test for "--with-id-type="
|
||||
dnl Default is "unsigned int". Can also be "long", "llong" or "int".
|
||||
dnl
|
||||
dnl Generates config.h macro.
|
||||
dnl
|
||||
AC_DEFUN([ZAC_ARG_WITH_ID],
|
||||
[
|
||||
AC_MSG_CHECKING([data type for ZOLTAN_ID_TYPE])
|
||||
zoltan_id_type="unset"
|
||||
AC_ARG_WITH(id-type,
|
||||
AC_HELP_STRING([--with-id-type], [Zoltan global ID type: uint (default), ulong, or ullong]),
|
||||
[
|
||||
if test "X$withval" == "Xuint" ; then
|
||||
AC_DEFINE([UNSIGNED_INT_GLOBAL_IDS],[1],[define if ZOLTAN_ID_TYPE is unsigned int])
|
||||
zoltan_id_type="unsigned int"
|
||||
else
|
||||
if test "X$withval" == "Xulong" ; then
|
||||
AC_DEFINE([UNSIGNED_LONG_GLOBAL_IDS],[1],[define if ZOLTAN_ID_TYPE is unsigned long])
|
||||
zoltan_id_type="unsigned long"
|
||||
else
|
||||
if test "X$withval" == "Xullong" ; then
|
||||
AC_DEFINE([UNSIGNED_LONG_LONG_GLOBAL_IDS],[1],[define if ZOLTAN_ID_TYPE is unsigned long long])
|
||||
zoltan_id_type="unsigned long long"
|
||||
else
|
||||
AC_MSG_ERROR([Valid global ID types for Zoltan are uint, ulong, and ullong])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
],
|
||||
[
|
||||
AC_DEFINE([UNSIGNED_INT_GLOBAL_IDS],[1],[define if ZOLTAN_ID_TYPE is unsigned int])
|
||||
zoltan_id_type="unsigned int"
|
||||
]
|
||||
)
|
||||
AC_MSG_RESULT([typedef $zoltan_id_type ZOLTAN_ID_TYPE])
|
||||
]
|
||||
)
|
Reference in New Issue
Block a user