ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/ac-tools/aclocal.m4
(Generate patch)

Comparing trunk/OOPSE-2.0/ac-tools/aclocal.m4 (file contents):
Revision 1579 by chuckv, Fri Oct 15 19:38:12 2004 UTC vs.
Revision 2199 by gezelter, Thu Apr 14 21:41:56 2005 UTC

# Line 1 | Line 1
1 + dnl We need a function similar to AC_CHECK_LIB to check for C++ libraries.
2 + dnl AC_CHECK_CXX_LIB provides a similar interface like AC_CHECK_LIB
3 + dnl and uses AC_TRY_LINK.
4 + dnl
5 + dnl $1 library name (without "-l")
6 + dnl $2 object name to check for
7 + dnl $3 neccessary include directive(s)
8 + dnl $4 command to create object $2
9 + dnl $5 yes-action
10 + dnl $6 no-action
11 + dnl $7 include dir for $3 (with -I)
12 + dnl $8 additional libraries to link with
13 +
14 + AC_DEFUN(AC_CHECK_CXX_LIB, AC_MSG_CHECKING([for $2 in -l$1])
15 + save_CXXFLAGS_CHECK_CXX_LIB="$CXXFLAGS"
16 + CXXFLAGS="$CXXFLAGS $7"
17 + save_LIBS_CHECK_CXX_LIB="$LIBS"
18 + LIBS="-l$1 $8 $LIBS"
19 + [AC_TRY_LINK([$3], [$4], [AC_MSG_RESULT([yes])
20 + $5], [AC_MSG_RESULT([no])
21 + $6])]
22 + CXXFLAGS="$save_CXXFLAGS_CHECK_CXX_LIB"
23 + LIBS="$save_LIBS_CHECK_CXX_LIB")dnl
24   dnl
25   dnl AC_CHECK_MODSUFFIX
26   dnl
# Line 652 | Line 675 | if test "$ac_test_CXXFLAGS" != "set"; then
675                  echo "*******************************************************"
676          fi;;
677     *darwin*)
678 <        if test "$CXX" = xlc++; then
678 >        if test "$CXX" = xlc++ -o "$CXX" = xlC ; then
679                  CXXFLAGS="-qthreaded -O -qtune=auto -qarch=auto -qunroll=auto -qaltivec"
680          fi;;
681    esac
# Line 984 | Line 1007 | fi
1007   if test x = x"$MPI_LIB"; then
1008          AC_CHECK_LIB(mpi, MPI_Init, [MPI_LIB="-lmpi -llam"], [],
1009                       "-llam")
1010 + fi
1011 + $as_unset ac_cv_lib_mpich_MPI_Init
1012 + if test x = x"$MPI_LIB"; then
1013 +        AC_CHECK_LIB(mpich, MPI_Init, [MPI_LIB="-lmpich -lpmpich"], [],
1014 +                     "-lpmpich")
1015   fi
1016  
1017   $as_unset ac_cv_lib_mpi_MPI_Init
# Line 1055 | Line 1083 | AC_DEFUN([adl_FUNC_GETOPT_LONG],
1083   AC_DEFUN([adl_FUNC_GETOPT_LONG],
1084   [AC_PREREQ(2.49)dnl
1085    # clean out junk possibly left behind by a previous configuration
1086 <  rm -f src/utils/getopt.h
1086 >  rm -f src/getopt.h
1087    # Check for getopt_long support
1088    AC_CHECK_HEADERS([getopt.h])
1089    AC_CHECK_FUNCS([getopt_long],,
# Line 1064 | Line 1092 | AC_DEFUN([adl_FUNC_GETOPT_LONG],
1092       [# use the GNU replacement
1093        AC_LIBOBJ(getopt)
1094        AC_LIBOBJ(getopt1)
1095 <      AC_CONFIG_LINKS([src/utils/getopt.h:src/utils/gnugetopt.h])])])])
1095 >      AC_CONFIG_LINKS([src/getopt.h:src/utils/gnugetopt.h])])])])
1096  
1097  
1098   AC_DEFUN([ACX_CONFIG_HOME], [
# Line 1129 | Line 1157 | AC_SUBST(enable_latex_docs)
1157   AC_SUBST(enable_html_docs)
1158   AC_SUBST(enable_latex_docs)
1159   ])
1160 + #
1161 + #
1162 + #
1163 + AC_DEFUN([AX_SYS_PERLSHARPBANG],[dnl
1164 +
1165 +   AC_PATH_PROG(PERLINTERP,perl,perl)
1166 +   ac_cv_path_perlinterp="$PERLINTERP"
1167 +   _sHpB='#!'
1168 +
1169 +   AC_ARG_WITH(perl-shebang,
1170 +                AC_HELP_STRING([--with-perl-shebang],
1171 +           [override what perl thinks is the way for the kernel to start it (seldom needed)]dnl
1172 +                           ),
1173 +                [opt_perl_shebang="$withval"]dnl
1174 +                            ,dnl
1175 +                [opt_perl_shebang="not_set"]dnl
1176 +    )dnl
1177 +
1178 +   AC_CACHE_CHECK([whether explicit instead of detected sharpbang is to be used],
1179 +                   ax_cv_opt_perl_shebang,
1180 +                  [ case "$opt_perl_shebang" in
1181 +                      not_set  ) ax_cv_opt_perl_shebang=''
1182 +                               ;;
1183 +                         *     )
1184 +        ax_cv_opt_perl_shebang=`echo "$opt_perl_shebang" | sed -e's|^#!\s*\(.*\)$|\1|'`
1185 +                    esac
1186 +                  ]dnl
1187 +    )dnl
1188  
1189 +   if test "A$ax_cv_opt_perl_shebang" != "A"
1190 +     then
1191 +       ac_cv_sys_kernshrpbang_perl="$ax_cv_opt_perl_shebang"
1192 +       PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
1193 +       AC_SUBST(PERL_SHEBANG)dnl
1194 +       AC_MSG_NOTICE([OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG.])
1195 +
1196 + # Automatic detection of sharpbang formula starts here
1197 +     else dnl
1198 +
1199 +   _somian_shbangperl=`$PERLINTERP -V:startperl`
1200 +   negclass="[[^']]"; dnl
1201 + # must leave this comment:  m4 will remove the outer brackets for us, heheh
1202 +   AC_CACHE_CHECK([for kernel sharpbang invocation to start perl],
1203 +                  ac_cv_sys_kernshrpbang_perl,
1204 +        [_somian_kspb_perl=`echo "$_somian_shbangperl" | sed -ne"s|.*='\($negclass*\)';$|\1|p"`
1205 +        if test "x$_somian_kspb_perl" == x
1206 +          then _somian_ksbp_warn_empty='durnit'
1207 +          else
1208 +          case "A$_somian_kspb_perl" in
1209 +                 A#!*perl* )
1210 +           ac_cv_sys_kernshrpbang_perl=`echo "$_somian_kspb_perl" | sed -e's|#!\(.*\)$|\1|'`
1211 +                        ;;
1212 +                     A*    )  _somian_ksbp_warn_defau='trouble'
1213 +                              ac_cv_sys_kernshrpbang_perl="$PERLINTERP"
1214 +          esac
1215 +        fi
1216 + ])dnl Done with testing sharpbang
1217 +
1218 + # The above prints Checking ... result message to user.
1219 +   PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
1220 +   AC_SUBST(PERL_SHEBANG)
1221 +    if test A${_somian_ksbp_warn_empty+set} == Aset
1222 +      then   AC_MSG_WARN([dnl
1223 + In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen.])
1224 +    fi
1225 + # Inform user after printing result value
1226 +    if test A${_somian_ksbp_warn_defau+set} == Aset
1227 +      then AC_MSG_NOTICE([Maybe Not good -])
1228 +           AC_MSG_WARN([dnl
1229 + In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP])
1230 +      else AC_MSG_NOTICE([OK Good result - ])
1231 +           AC_MSG_NOTICE([dnl
1232 + In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl])
1233 + dnl Done with user info messages
1234 +    fi
1235 + dnl Outer loop checked for user override term here
1236 +  fi dnl
1237 +
1238 + ])dnl EOMACRO DEF

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines