Commit 6ef688f1 authored by Dave Goodell's avatar Dave Goodell
Browse files

delete "relative" svn:externals dirs

Also add autogen.sh logic to copy from authoritative sources to the
correct "externals".  So "src/pm/hydra/confdb" is now copied (in a
special fashion) from "confdb" at autogen.sh-time.  Prior to this commit
these externals were simply tracked in the git repository as a
consequence of their (non-trivial) export from SVN.

Non-relative svn:externals, such as "src/openpa" are not dealt with in
this commit.

No reviewer.
parent 153f14c6
......@@ -61,10 +61,102 @@ if test -d maint/hooks/pre ; then
done
fi
########################################################################
# This used to be an optionally installed hook to help with git-svn
# versions of the old SVN repo. Now that we are using git, this is our
# mechanism that replaces relative svn:externals paths, such as for
# "confdb" and "mpl".
#
# The basic plan is to copy all of the files that are under source
# control, but copy the working tree versions instead in case of local
# modifications. This will catch files that have been "git add"ed, but
# not random untracked files sitting in the working copy.
#
# It is especially important not to copy files like "aclocal.m4" from
# one dir to the other, since this will touch the mtime of the file and
# likely cause "make" to attempt to rebuild "configure". If you are
# attempting to simplify the logic below, consider yourself warned ;)
echo
echo "####################################"
echo "## Replicating confdb (and similar)"
echo "####################################"
echo
sync_external () {
srcdir=$1
destdir=$2
echo "syncing '$srcdir' --> '$destdir'"
# this code probably breaks for any filenames with a space (' ')
mkdir -p "$destdir"
# The first cmd gets any files listed in the current HEAD commit,
# while the second cmd gets anything that has been added to the
# index since that commit (but won't handle deleted files that have
# been staged to the index). Both will produce lists of paths
# (relative to $srcdir) to tracked files, but no directories.
# Populated subdirectories of $srcdir will be handled correctly.
scm_files=`( git ls-tree -r --name-only HEAD:$srcdir ; cd confdb && git ls-files -m -d -c --exclude-standard ) | sort | uniq`
for scm_file in $scm_files ; do
s="$srcdir/$scm_file"
d="$destdir/$scm_file"
if [ -f "$s" ] ; then
mkdir -p `dirname "$d"`
cp -a "$s" "$d"
else
rm -f "$d"
fi
done
}
confdb_dirs=
confdb_dirs="${confdb_dirs} src/mpi/romio/confdb"
confdb_dirs="${confdb_dirs} src/mpl/confdb"
confdb_dirs="${confdb_dirs} src/pm/hydra/confdb"
confdb_dirs="${confdb_dirs} src/pm/hydra/mpl/confdb"
confdb_dirs="${confdb_dirs} test/mpi/confdb"
confdb_dirs="${confdb_dirs} src/armci/m4"
in_git_work_tree=`git rev-parse --is-inside-work-tree 2> /dev/null`
if [ "X$in_git_work_tree" = 'Xtrue' ] ; then
# hydra's copy of mpl
sync_external src/mpl src/pm/hydra/mpl
# all the confdb directories, by various names
for destdir in $confdb_dirs ; do
sync_external confdb "$destdir"
done
# a couple of other random files
if [ -f maint/version.m4 ] ; then
cp -a maint/version.m4 src/pm/hydra/version.m4
cp -a maint/version.m4 src/mpi/romio/version.m4
fi
else
# an expected case for release tarballs
echo "Not in a git repository (or cannot execute git), skipping."
fi
# Now sanity check that:
# (A) much of the above sync was successful, or
# (B) someone else already performed an equivalent sync, such as when we are a
# release tarball.
f="aclocal_cc.m4"
for d in $confdb_dirs ; do
if [ -f "$d/$f" ] ; then :
else
error "expected to find '$f' in '$d'"
exit 1
fi
done
########################################################################
echo
echo "##################################"
echo "####################################"
echo "## Checking user environment"
echo "##################################"
echo "####################################"
echo
########################################################################
......
dnl This version of aclocal.m4 simply includes all of the individual
dnl components
builtin(include,aclocal_am.m4)
builtin(include,aclocal_bugfix.m4)
builtin(include,aclocal_cache.m4)
builtin(include,aclocal_cc.m4)
builtin(include,aclocal_atomic.m4)
dnl aclocal_cross.m4 uses autoconf features dated back to 2.13.
dnl too old to be useful, 07/14/2010.
dnl builtin(include,aclocal_cross.m4)
builtin(include,aclocal_cxx.m4)
builtin(include,aclocal_f77.m4)
dnl aclocal_f77old.m4 contains PAC_PROG_F77_CMDARGS which is NOT used in MPICH
dnl but it is still used by other packages, so leave it in confdb.
dnl builtin(include,aclocal_f77old.m4)
builtin(include,aclocal_util.m4)
builtin(include,aclocal_subcfg.m4)
builtin(include,aclocal_make.m4)
builtin(include,aclocal_mpi.m4)
builtin(include,aclocal_shl.m4)
dnl fortran90.m4 defines [Fortran 90] as an AC_LANG
dnl which works for autoconf 2.63 and older, 07/14/2010.
dnl builtin(include,fortran90.m4)
builtin(include,aclocal_runlog.m4)
builtin(include,aclocal_fc.m4)
builtin(include,aclocal_libs.m4)
builtin(include,aclocal_attr_alias.m4)
builtin(include,ax_tls.m4)
builtin(include,aclocal_romio.m4)
dnl Add the libtool files that libtoolize wants
dnl Comment these out until libtool support is enabled.
dnl May need to change this anyway, since libtoolize
dnl does not seem to understand builtin
dnl builtin(include,libtool.m4)
dnl builtin(include,ltoptions.m4)
dnl builtin(include,ltversion.m4)
dnl builtin(include,ltsugar.m4)
dnl builtin(include,lt~obsolete.m4)
dnl AM_IGNORE is an extension that tells (a patched) automake not to
dnl include the specified AC_SUBST variable in the Makefile.in that
dnl automake generates. We don't use AC_DEFUN, since aclocal will
dnl then complain that AM_IGNORE is a duplicate (if you are using the
dnl patched automake/aclocal).
m4_ifdef([AM_IGNORE],[],[m4_define([AM_IGNORE],[])])
dnl /*D PAC_C_MEMATOMIC - Try and determine how to implement memory-atomic
dnl operations with the selected C compiler
dnl
dnl Synopsis:
dnl PAC_C_MEMATOMIC
dnl
dnl Notes:
dnl Defines names of the following form
dnl + HAVE_GCC_ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - gcc __asm__ will issue
dnl mfence, lfence, or sfence
dnl . HAVE___ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - __asm _emit will issue
dnl mfence, lfence, or sfence
dnl . HAVE_ASM_AND_X86_{MFENCE,LFENCE,SFENCE} - asm("...") will issue
dnl mfence, lfence, or sfence
dnl . HAVE__INTERLOCKEDEXCHANGE - _InterlockedExchange intrinsic is available
dnl (IA64)
dnl . HAVE_GCC_ASM_SPARC_MEMBAR - gcc __asm__ will issue SPARC architecture
dnl memory barrier instruction
dnl . HAVE_SOLARIS_ASM_SPARC_MEMBAR - Solaris asm() will issue SPARC
dnl architecture memory barrier instruction
dnl . HAVE_GCC_ASM_SPARC_STBAR - gcc __asm__ will issue stbar
dnl - HAVE_SOLARIS_ASM_SPARC_STBAR - Solaris __asm() will issue stbar
dnl
dnl D*/
AC_DEFUN([PAC_C_MEMATOMIC],[
AC_CACHE_CHECK([for x86 mfence instruction using __asm__],
pac_cv_have_gcc_asm_and_x86_mfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
__asm__ __volatile__ ( ".byte 0x0f, 0xae, 0xf0" ::: "memory" );
exit(0);
}
],
pac_cv_have_gcc_asm_and_x86_mfence=yes,pac_cv_have_gcc_asm_and_x86_mfence=no)])
if test "$pac_cv_have_gcc_asm_and_x86_mfence" = "yes" ; then
AC_DEFINE(HAVE_GCC_ASM_AND_X86_MFENCE, 1, [Define if using gcc on a x86 system with the mfence instruction])
fi
AC_CACHE_CHECK([for x86 sfence instruction using __asm__],
pac_cv_have_gcc_asm_and_x86_sfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
__asm__ __volatile__ ( ".byte 0x0f, 0xae, 0xf8" ::: "memory" );
exit(0);
}
],
pac_cv_have_gcc_asm_and_x86_sfence=yes,pac_cv_have_gcc_asm_and_x86_sfence=no)])
if test "$pac_cv_have_gcc_asm_and_x86_sfence" = "yes" ; then
AC_DEFINE(HAVE_GCC_ASM_AND_X86_SFENCE, 1, [Define if using gcc on a x86 system with the sfence instruction])
fi
AC_CACHE_CHECK([for x86 lfence instruction using __asm__],
pac_cv_have_gcc_asm_and_x86_lfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
__asm__ __volatile__ ( ".byte 0x0f, 0xae, 0xe8" ::: "memory" );
exit(0);
}
],
pac_cv_have_gcc_asm_and_x86_lfence=yes,pac_cv_have_gcc_asm_and_x86_lfence=no)])
if test "$pac_cv_have_gcc_asm_and_x86_lfence" = "yes" ; then
AC_DEFINE(HAVE_GCC_ASM_AND_X86_LFENCE, 1, [Define if using gcc on a x86 system with the lfence instruction])
fi
dnl Some compilers, like icc, may want __asm _emit
AC_CACHE_CHECK([for x86 mfence instruction using __asm],
pac_cv_have___asm_and_x86_mfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
__asm _emit 0x0f __asm _emit 0xae __asm _emit 0xf0 ;
exit(0);
}
],
pac_cv_have___asm_and_x86_mfence=yes,pac_cv_have___asm_and_x86_mfence=no)])
if test "$pac_cv_have___asm_and_x86_mfence" = "yes" ; then
AC_DEFINE(HAVE___ASM_AND_X86_MFENCE, 1, [Define if using __asm on a x86 system with the mfence instruction])
fi
AC_CACHE_CHECK([for x86 sfence instruction using __asm],
pac_cv_have___asm_and_x86_sfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
__asm sfence ;
exit(0);
}
],
pac_cv_have___asm_and_x86_sfence=yes,pac_cv_have___asm_and_x86_sfence=no)])
if test "$pac_cv_have___asm_and_x86_sfence" = "yes" ; then
AC_DEFINE(HAVE___ASM_AND_X86_SFENCE, 1, [Define if using __asm on a x86 system with the sfence instruction])
fi
AC_CACHE_CHECK([for x86 lfence instruction using __asm],
pac_cv_have___asm_and_x86_lfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
__asm _emit 0x0f __asm _emit 0xae __asm _emit 0xe8 ;
exit(0);
}
],
pac_cv_have___asm_and_x86_lfence=yes,pac_cv_have___asm_and_x86_lfence=no)])
if test "$lac_cv_have___asm_and_x86_lfence" = "yes" ; then
AC_DEFINE(HAVE___ASM_AND_X86_LFENCE, 1, [Define if using __asm on a x86 system with the lfence instruction])
fi
dnl
dnl Some compilers, such as pgcc, may require additional arguments.
dnl pgcc may need -Masmkeyword flag. We may want to try this with and
dnl without adding -Masmkeyword to CFLAGS
AC_CACHE_CHECK([for x86 mfence instruction using asm()],
pac_cv_have_asm_and_x86_mfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
asm("_emit 0x0f __asm _emit 0xae __asm _emit 0xf0");
exit(0);
}
],
pac_cv_have_asm_and_x86_mfence=yes,pac_cv_have_asm_and_x86_mfence=no)])
if test "$pac_cv_have_asm_and_x86_mfence" = "yes" ; then
AC_DEFINE(HAVE_ASM_AND_X86_MFENCE, 1, [Define if using asm() on a x86 system with the mfence instruction])
fi
AC_CACHE_CHECK([for x86 sfence instruction using asm()],
pac_cv_have_asm_and_x86_sfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
asm("sfence");
exit(0);
}
],
pac_cv_have_asm_and_x86_sfence=yes,pac_cv_have_asm_and_x86_sfence=no)])
if test "$pac_cv_have_asm_and_x86_sfence" = "yes" ; then
AC_DEFINE(HAVE_ASM_AND_X86_SFENCE, 1, [Define if using asm() on a x86 system with the sfence instruction])
fi
AC_CACHE_CHECK([for x86 lfence instruction using asm()],
pac_cv_have_asm_and_x86_lfence,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
asm("_emit 0x0f __asm _emit 0xae __asm _emit 0xe8");
exit(0);
}
],
pac_cv_have_asm_and_x86_lfence=yes,pac_cv_have_asm_and_x86_lfence=no)])
if test "$pac_cv_have_asm_and_x86_lfence" = "yes" ; then
AC_DEFINE(HAVE_ASM_AND_X86_LFENCE, 1, [Define if using asm() on a x86 system with the lfence instruction])
fi
AC_CACHE_CHECK([for _InterlockedExchange intrinsic],
pac_cv_have__InterlockedExchange,[
AC_TRY_RUN([
int main(int argc, char **argv)
{
unsigned long lock, *lock_ptr;
lock_ptr = &lock;
_InterlockedExchange(lock_ptr, 1);
exit(0);
}
],
pac_cv_have__InterlockedExchange=yes,pac_cv_have__InterlockedExchange=no)])
if test "$pac_cv_have__InterlockedExchange" = "yes" ; then
AC_DEFINE(HAVE__INTERLOCKEDEXCHANGE, 1, [Define if _InterlockedExchange intrinsic is available])
fi
AC_CACHE_CHECK([for SPARC membar instruction with gcc],
pac_cv_gcc_sparc_membar,[
AC_TRY_RUN([
int main(int argc, char **argv){
__asm__ __volatile__ ( "membar #StoreLoad | #StoreStore" : : : "memory" );
exit(0);
}],pac_cv_gcc_sparc_membar=yes,pac_cv_gcc_sparc_membar=no)])
if test "$pac_cv_gcc_sparc_membar" = yes ; then
AC_DEFINE(HAVE_GCC_ASM_SPARC_MEMBAR,1,[Define if gcc asm membar supported])
fi
AC_CACHE_CHECK([for SPARC membar instruction with Solaris C],
pac_cv_solaris_sparc_membar,[
AC_TRY_RUN([
int main(int argc, char **argv){
__asm ( "membar #StoreLoad | #StoreStore");
exit(0);
}],pac_cv_solaris_sparc_membar=yes,pac_cv_solaris_sparc_membar=no)])
if test "$pac_cv_solaris_sparc_membar" = yes ; then
AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_MEMBAR,1,[Define if solaris asm membar supported])
fi
AC_CACHE_CHECK([for SPARC stbar instruction with gcc],
pac_cv_gcc_sparc_stbar,[
AC_TRY_RUN([
int main(int argc, char **argv){
__asm__ __volatile__ ( "stbar" : : : "memory" );
exit(0);
}],pac_cv_gcc_sparc_stbar=yes,pac_cv_gcc_sparc_stbar=no)])
if test "$pac_cv_gcc_sparc_stbar" = yes ; then
AC_DEFINE(HAVE_GCC_ASM_SPARC_STBAR,1,[Define if gcc asm stbar supported])
fi
AC_CACHE_CHECK([for SPARC stbar instruction with Solaris C],
pac_cv_solaris_sparc_stbar,[
AC_TRY_RUN([
int main(int argc, char **argv){
__asm ( "stbar" );
exit(0);
}],pac_cv_solaris_sparc_stbar=yes,pac_cv_solaris_sparc_stbar=no)])
if test "$pac_cv_solaris_sparc_stbar" = yes ; then
AC_DEFINE(HAVE_SOLARIS_ASM_SPARC_STBAR,1,[Define if solaris asm stbar supported])
fi
])
\ No newline at end of file
dnl
dnl Check for BSD or POSIZ style global symbol lister, nm.
dnl If found, pac_path_NM_G contains the absolute athname of nm + options
dnl pac_path_NM_G_type will be either POSIX or BSD. NM_G will be
dnl pac_path_NM_G without the absolute path. Preference is BSD style.
dnl
dnl The test checks if nm accepts the known options and also if nm produces
dnl the expected BSD or POSIX output format.
dnl
AC_DEFUN([PAC_PATH_NM_G],[
AC_MSG_CHECKING([for BSD/POSIX style global symbol lister])
AC_LANG_PUSH(C)
AC_PATH_PROGS_FEATURE_CHECK(NM_G, nm, [
# Check if nm accepts -g and BSD or POSIX compatible flag.
# Use the `sed 1q' to avoid HP-UX's unknown option message:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
#
# AIX's sed does not accept \+, 1) instead of doing 's|a\+||', do 's|aa*||'
# or 2) instead of 's|A \+B|AB|g', do 's|A *B|AB|g'
# Check if nm accepts -g
case `${ac_path_NM_G} -g /dev/null 2>&1 | sed '1q'` in
*/dev/null* | *'Invalid file or object type'*)
ac_path_NM_G="${ac_path_NM_G} -g"
# Check if nm accepts -B
case `${ac_path_NM_G} -B /dev/null 2>&1 | sed '1q'` in
*/dev/null* | *'Invalid file or object type'*)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([int iglobal;])
],[
changequote(,)
case `${ac_path_NM_G} -B conftest.$OBJEXT | sed -e 's|[0-9][0-9]* *[A-Z] *iglobal|XXXX|g'` in
*XXXX*)
pac_path_NM_G="${ac_path_NM_G} -B"
pac_path_NM_G_type="BSD"
;;
esac
changequote([,])
])
;;
*)
# Check if nm accepts -P
case `${ac_path_NM_G} -P /dev/null 2>&1 | sed '1q'` in
*/dev/null* | *'Invalid file or object type'*)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([int iglobal;])
],[
changequote(,)
case `${ac_path_NM_G} -P conftest.$OBJEXT | sed -e 's|iglobal *[A-Z] *[0-9][0-9]*|XXXX|g'` in
*XXXX*)
pac_path_NM_G="${ac_path_NM_G} -P"
pac_path_NM_G_type="POSIX"
;;
esac
changequote([,])
])
;;
esac # Endof case `${ac_path_NM_G} -P
;;
esac # Endof case `${ac_path_NM_G} -B
;;
esac # Endof case `${ac_path_NM_G} -g
if test "X$pac_path_NM_G" != "X" ; then
AC_MSG_RESULT([$pac_path_NM_G_type style,$pac_path_NM_G])
NM_G="`echo $pac_path_NM_G | sed -e 's|^.*nm |nm |g'`"
else
AC_MSG_RESULT(no)
fi
ac_cv_path_NM_G=${ac_path_NM_G}
ac_path_NM_G_found=:
], [AC_MSG_RESULT(no)],
[$PATH$PATH_SEPARATOR/usr/ccs/bin/elf$PATH_SEPARATOR/usr/ccs/bin$PATH_SEPARATOR/usr/ucb$PATH_SEPARATOR/bin])
AC_LANG_POP(C)
]) dnl Endof AC_DEFUN([PAC_PATH_NM_G]
dnl
dnl PAC_C_MULTI_ATTR_ALIAS()
dnl
dnl The checks if multiple __attribute__((alias)) is available
dnl If the multiple __attribute((alias)) support is found,
dnl pac_c_multi_attr_alias=yes is set.
dnl
dnl The default is to do a runtime test. When cross_compiling=yes,
dnl pac_path_NM_G will be used to determine the test result.
dnl If CFLAGS(or CPPFLAGS) contains ATTR_ALIAS_DEBUG, the runtime will print
dnl out addresses of struct(s) for debugging purpose.
dnl
dnl
AC_DEFUN([PAC_C_MULTI_ATTR_ALIAS],[
AC_REQUIRE([PAC_PATH_NM_G])
AC_LANG_PUSH(C)
AC_CHECK_HEADERS([stdio.h])
AC_MSG_CHECKING([for multiple __attribute__((alias)) support])
#Compile the "other" __attribute__ object file.
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
struct mpif_cmblk_t_ { int imember; };
typedef struct mpif_cmblk_t_ mpif_cmblk_t;
/* NOT initialize these structure so it appears in BSS or as COMMON symbols */
mpif_cmblk_t mpifcmb;
mpif_cmblk_t MPIFCMB;
/*
Do the test in this file instead in the file
where __attribute__((alias)) is used.
This is needed for pgcc since pgcc seems to
define aliased symbols if they are in the same file.
*/
/*
We can't do the following comparision in one test:
ilogical = (( &mpifcmb == ptr && &MPIFCMB == ptr ) ? TRUE : FALSE) ;
because some compiler, like gcc 4.4.2's -O* optimizes the code
such that the ilogical expression is FALSE. The likely reason is that
mpifcmb and MPIFCMB are defined in the same scope in which C optimizer
may have treated them as different objects (with different addresses),
&mpifcmb != &MPIFCMB, before actually running the test and hence the
illogical expression is assumed to be always FALSE. The solution taken
here is to prevent the optimizer the opportunity to equate &mpifcmb and
&MPIFCMB (in same scope), e.g. using 2 separate tests and combine the
test results in a different scope.
*/
int same_addrs1( void *ptr );
int same_addrs1( void *ptr )
{
#if defined(ATTR_ALIAS_DEBUG)
printf( "others: addr(mpifcmb)=%p, addr(input ptr)=%p\n", &mpifcmb, ptr );
#endif
return ( &mpifcmb == ptr ? 1 : 0 );
}
int same_addrs2( void *ptr );
int same_addrs2( void *ptr )
{
#if defined(ATTR_ALIAS_DEBUG)
printf( "others: addr(MPIFCMB)=%p, addr(input ptr)=%p\n", &MPIFCMB, ptr );
#endif
return ( &MPIFCMB == ptr ? 1 : 0 );
}
])
],[
rm -f pac_conftest_other.$OBJEXT
PAC_RUNLOG([cp conftest.$OBJEXT pac_conftest_other.$OBJEXT])
test -s pac_conftest_other.$OBJEXT && pac_c_attr_alias_other=yes
dnl cp conftest.$ac_ext pac_conftest_other.$ac_ext
dnl echo
dnl echo "pac_conftest_other.$OBJEXT"
dnl nm -P -g pac_conftest_other.$OBJEXT | grep -i "mpifcmb"
],[
pac_c_attr_alias_other=no
]) dnl Endof AC_COMPILE_IFELSE
pac_c_attr_alias_main=no
if test "$pac_c_attr_alias_other" = "yes" ; then
# Push LIBS for later restoration.
PAC_PUSH_FLAG([LIBS])
LIBS="pac_conftest_other.$OBJEXT $LIBS"
# Link the "other" __attribute__ object file.
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
#if defined(HAVE_STDIO_H) || defined(STDC_HEADERS)
#include <stdio.h>
#endif
struct mpif_cmblk_t_ { int imember; };
typedef struct mpif_cmblk_t_ mpif_cmblk_t;
mpif_cmblk_t mpifcmbr = {0};
extern mpif_cmblk_t MPIFCMB __attribute__ ((alias("mpifcmbr")));
extern mpif_cmblk_t mpifcmb __attribute__ ((alias("mpifcmbr")));
extern int same_addrs1( void *ptr );
extern int same_addrs2( void *ptr );
],[
int iaddr = 0;
#if defined(ATTR_ALIAS_DEBUG)
printf( "main: addr(mpifcmbr) = %p\n", &mpifcmbr );
printf( "main: addr(mpifcmb) = %p\n", &mpifcmb );
printf( "main: addr(MPIFCMB) = %p\n", &MPIFCMB );
#endif
iaddr = same_addrs1( &mpifcmbr ) && same_addrs2( &mpifcmbr );
FILE *file = fopen( "pac_conftestval", "w" );
if (!file) return 1;
fprintf( file, "%d\n", iaddr );
])
],[
rm -f pac_conftest_main$EXEEXT
PAC_RUNLOG([cp conftest$EXEEXT pac_conftest_main$EXEEXT])
test -x pac_conftest_main$EXEEXT && pac_c_attr_alias_main=yes
dnl cp conftest.$ac_ext pac_conftest_main.$ac_ext
dnl echo
dnl echo "pac_conftest_main$EXEEXT"
dnl nm -P -g pac_conftest_main$EXEEXT | grep -i "mpifcmb"
],[
pac_c_attr_alias_main=no
dnl cp conftest.$ac_ext pac_conftest_main.$ac_ext
]) dnl Endof AC_LINK_IFELSE
# Restore the previously pushed LIBS
PAC_POP_FLAG([LIBS])
rm -f pac_conftest_other.$OBJEXT
fi dnl Endof if test "$pac_c_attr_alias_other" = "yes"
if test "$pac_c_attr_alias_main" = "yes" ; then
if test "$cross_compiling" = "yes" ; then
changequote(,)
# echo "PAC CROSS-COMPILING" dnl
# POSIX NM = nm -P format dnl
if test "$pac_path_NM_G_type" = "POSIX" ; then
addrs=`${pac_path_NM_G} ./pac_conftest_main$EXEEXT | grep -i mpifcmb | sed -e 's% *[a-zA-Z][a-zA-Z]* *[a-zA-Z] *\([0-9abcdef][0-9abcdef]*\).*%\1%g'`
fi
# BSD NM = nm -B format dnl
if test "$pac_path_NM_G_type" = "BSD" ; then
addrs=`${pac_path_NM_G} -g ./pac_conftest_main$EXEEXT | grep -i mpifcmb | sed -e "s% *\([0-9abcdef][0-9abcdef]*\) *[a-zA-Z] *[a-zA-Z][a-zA-A]*.*%\1%g"`
fi
changequote([,])
cmp_addr=""
diff_addrs=no
for addr in ${addrs} ; do
if test "X${cmp_addr}" != "X" ; then
if test "${cmp_addr}" != "${addr}" ; then
diff_addrs=yes
break
fi
else
cmp_addr=${addr}
fi
done
if test "$diff_addrs" != "yes" ; then
dnl echo "Same addresses. Multiple aliases support"
AC_MSG_RESULT([${NM_G} says yes])
pac_c_multi_attr_alias=yes
else
dnl echo "Different addresses. No multiple aliases support."
AC_MSG_RESULT([${NM_G} says no])
pac_c_multi_attr_alias=no
fi
else # if test "$cross_compiling" != "yes"
rm -f pac_conftestval
ac_try="./pac_conftest_main$EXEEXT"
if AC_TRY_EVAL(ac_try) ; then