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

Comparing trunk/OOPSE/ac-tools/aclocal.m4 (file contents):
Revision 838 by gezelter, Wed Oct 29 03:06:51 2003 UTC vs.
Revision 944 by gezelter, Wed Jan 14 22:41:34 2004 UTC

# Line 171 | Line 171 | call MPI_Init(ierr)
171      AC_SUBST(MPIMODLIBNAME)
172    else
173      AC_MSG_RESULT(no)
174 <    AC_MSG_ERROR([Couldn't locate MPI F90 Modules])
174 >    AC_MSG_WARN([Couldn't locate MPI F90 Modules])
175    fi
176  
177   ])
178  
179  
180 +
181 +
182   dnl
183   dnl AM_PATH_SPRNG
184   dnl
# Line 253 | Line 255 | AC_ARG_WITH(mkl,
255   AC_DEFUN([CHECK_MKL],
256   [AC_MSG_CHECKING(if MKL is wanted)
257   AC_ARG_WITH(mkl,
258 <              [  --with-mkl              Do we want MKL [will check /usr/local/intel/mkl60 /opt/intel/mkl60]],
258 >              [  --with-mkl              Do we want MKL [will check /usr/local/intel/mkl61 /opt/intel/mkl61]],
259   [   AC_MSG_RESULT(yes)
260 <    for dir in $withval /usr/local/intel/mkl60 /opt/intel/mkl60; do
260 >    for dir in $withval /usr/local/intel/mkl61 /opt/intel/mkl61; do
261          mkldir="$dir"
262          if test -f "$dir/include/mkl.h"; then
263              found_mkl="yes";
# Line 299 | Line 301 | AC_DEFUN(ACX_CHECK_CC_FLAGS,
301   ])
302   dnl
303  
304 +
305   AC_DEFUN(ACX_CHECK_CC_FLAGS,
306   [
307   AC_REQUIRE([AC_PROG_CC])
# Line 379 | Line 382 | cat > conftest.c <<EOF
382   [
383   dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp.
384   cat > conftest.c <<EOF
385 < #ifdef __GNUC__
385 > #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
386   #  if (__GNUC__ > $1) || (__GNUC__ == $1 && __GNUC_MINOR__ >= $2)
387       yes;
388   #  endif
# Line 397 | Line 400 | fi
400   else
401          :
402          $4
403 + fi
404 + ])
405 +
406 + AC_DEFUN(ACX_PROG_GXX_VERSION,
407 + [
408 + AC_REQUIRE([AC_PROG_CXX])
409 + AC_CACHE_CHECK(whether we are using g++ $1.$2 or later, ac_cv_prog_gxx_$1_$2,
410 + [
411 + dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp.
412 + cat > conftest.cpp <<EOF
413 + #ifdef __GNUC__ && !defined (__INTEL_COMPILER)
414 + #  if (__GNUC__ > $1) || (__GNUC__ == $1 && __GNUC_MINOR__ >= $2)
415 +     yes;
416 + #  endif
417 + #endif
418 + EOF
419 + if AC_TRY_COMMAND(${CXX-c++} -E conftest.cpp) | egrep yes >/dev/null 2>&1; then
420 +  ac_cv_prog_gxx_$1_$2=yes
421 + else
422 +  ac_cv_prog_gxx_$1_$2=no
423 + fi
424 + ])
425 + if test "$ac_cv_prog_gxx_$1_$2" = yes; then
426 +        :
427 +        $3
428 + else
429 +        :
430 +        $4
431 + fi
432 + ])
433 +
434 + AC_DEFUN(ACX_PROG_REALLY_GCC,
435 + [
436 + AC_REQUIRE([AC_PROG_CC])
437 + AC_CACHE_CHECK(whether we are *really* using GNU cc, ac_cv_prog_really_gcc,
438 + [
439 + dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp.
440 + cat > conftest.c <<EOF
441 + #ifdef __GNUC__
442 +  #ifndef __INTEL_COMPILER
443 +     yes;
444 +  #endif
445 + #endif
446 + EOF
447 + if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
448 +  ac_cv_prog_really_gcc=yes
449 + else
450 +  ac_cv_prog_really_gcc=no
451 + fi
452 + ])
453 + if test "$ac_cv_prog_really_gcc" = yes; then
454 +        :
455 +        $1
456 + else
457 +        :
458 +        $2
459 + fi
460 + ])
461 +
462 + AC_DEFUN(ACX_PROG_REALLY_GXX,
463 + [
464 + AC_REQUIRE([AC_PROG_CXX])
465 + AC_CACHE_CHECK(whether we are *really* using GNU c++, ac_cv_prog_really_gxx,
466 + [
467 + dnl The semicolon after "yes" below is to pacify NeXT's syntax-checking cpp.
468 + cat > conftest.cpp <<EOF
469 + #ifdef __GNUC__
470 +  #ifndef __INTEL_COMPILER
471 +     yes;
472 +  #endif
473 + #endif
474 + EOF
475 + if AC_TRY_COMMAND(${CXX-c++} -E conftest.cpp) | egrep yes >/dev/null 2>&1; then
476 +  ac_cv_prog_really_gxx=yes
477 + else
478 +  ac_cv_prog_really_gxx=no
479   fi
480   ])
481 + if test "$ac_cv_prog_really_gxx" = yes; then
482 +        :
483 +        $1
484 + else
485 +        :
486 +        $2
487 + fi
488 + ])
489  
490  
491   AC_DEFUN(ACX_PROG_CC_MAXOPT,
# Line 406 | Line 493 | AC_REQUIRE([AC_CANONICAL_HOST])
493   AC_REQUIRE([AC_PROG_CC])
494   AC_REQUIRE([AC_CANONICAL_HOST])
495  
496 + ACX_PROG_REALLY_GCC
497 +
498   # Try to determine "good" native compiler flags if none specified on command
499   # line
500   if test "$ac_test_CFLAGS" != "set"; then
# Line 459 | Line 548 | if test "$ac_test_CFLAGS" != "set"; then
548    esac
549  
550    # use default flags for gcc on all systems
551 <  if test $ac_cv_prog_gcc = yes; then
551 >  if test $ac_cv_prog_really_gcc = yes; then
552       CFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
553    fi
554  
555    # test for gcc-specific flags:
556 <  if test $ac_cv_prog_gcc = yes; then
556 >  if test $ac_cv_prog_really_gcc = yes; then
557      # -malign-double for x86 systems
558      ACX_CHECK_CC_FLAGS(-malign-double,align_double, CFLAGS="$CFLAGS -malign-double")
559      # -fstrict-aliasing for gcc-2.95+
# Line 472 | Line 561 | if test "$ac_test_CFLAGS" != "set"; then
561    fi
562  
563    CPU_FLAGS=""
564 <  if test "$GCC" = "yes"; then
564 >  if test $ac_cv_prog_really_gcc = yes; then
565            dnl try to guess correct CPU flags, at least for linux
566            case "${host_cpu}" in
567            i586*)  ACX_CHECK_CC_FLAGS(-mcpu=pentium,cpu_pentium,
# Line 541 | Line 630 | AC_REQUIRE([AC_CANONICAL_HOST])
630   AC_REQUIRE([AC_PROG_CXX])
631   AC_REQUIRE([AC_CANONICAL_HOST])
632  
633 + ACX_PROG_REALLY_GXX
634 +
635   # Try to determine "good" native compiler flags if none specified on command
636   # line
637   if test "$ac_test_CXXFLAGS" != "set"; then
# Line 573 | Line 664 | if test "$ac_test_CXXFLAGS" != "set"; then
664          if test "$CXX" = xlC; then
665                  CXXFLAGS="-O3 -qtune=auto -qansialias -w"
666                  echo "*******************************************************"
667 <                echo "*  You have AIX on an unknown powerpc system.  It is  *"
668 <                echo "*  recommended that you use                           *"
667 >                echo "*  You have Darwin on an unknown powerpc system.      *"
668 >                echo "*  It is recommended that you use                     *"
669                  echo "*                                                     *"
670                  echo "*  CXXFLAGS=-O3 -qarch=ppc -qtune=xxx -qansialias -w  *"
671                  echo "*                                 ^^^                 *"
# Line 585 | Line 676 | if test "$ac_test_CXXFLAGS" != "set"; then
676    esac
677  
678    # use default flags for gcc on all systems
679 <  if test $ac_cv_prog_gcc = yes; then
679 >  if test $ac_cv_prog_really_gxx = yes; then
680       CXXFLAGS="-O6 -fomit-frame-pointer -Wall -W -Wcast-qual -Wpointer-arith -Wcast-align -pedantic"
681    fi
682  
683    # test for gcc-specific flags:
684 <  if test $ac_cv_prog_gcc = yes; then
684 >  if test $ac_cv_prog_really_gxx = yes; then
685      # -malign-double for x86 systems
686      ACX_CHECK_CXX_FLAGS(-malign-double,align_double, CXXFLAGS="$CXXFLAGS -malign-double")
687      # -fstrict-aliasing for gcc-2.95+
# Line 598 | Line 689 | if test "$ac_test_CXXFLAGS" != "set"; then
689    fi
690  
691    CPU_FLAGS=""
692 <  if test "$GCC" = "yes"; then
692 >  if test $ac_cv_prog_really_gxx = yes; then
693            dnl try to guess correct CPU flags, at least for linux
694            case "${host_cpu}" in
695 <          i586*)  ACX_CHECK_CC_FLAGS(-mcpu=pentium,cpu_pentium,
695 >          i586*)  ACX_CHECK_CXX_FLAGS(-mcpu=pentium,cpu_pentium,
696                          [CPU_FLAGS=-mcpu=pentium],
697                          [ACX_CHECK_CXX_FLAGS(-mpentium,pentium,
698                                  [CPU_FLAGS=-mpentium])])
# Line 618 | Line 709 | if test "$ac_test_CXXFLAGS" != "set"; then
709                          ACX_CHECK_CXX_FLAGS(-mcpu=$cputype,m_cpu_60x,
710                                  CPU_FLAGS=-mcpu=$cputype)
711                  elif test "$cputype" = 750; then
712 <                        ACX_PROG_GCC_VERSION(2,95,
712 >                        ACX_PROG_GXX_VERSION(2,95,
713                                  ACX_CHECK_CXX_FLAGS(-mcpu=750,m_cpu_750,
714                                          CPU_FLAGS=-mcpu=750))
715                  fi
# Line 674 | Line 765 | if test x"$F90FLAGS" = x ; then
765    F90FLAGS=""
766    case "${host_cpu}-${host_os}" in
767  
768 <  *linux*) if test "$F90" = ifc; then
768 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
769                      F90FLAGS="-O"
770                  fi;;
771     rs6000*-aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 749 | Line 840 | if test "$ac_test_PREPFLAG" != "set"; then
840    PREPFLAG=""
841    case "${host_cpu}-${host_os}" in
842  
843 <  *linux*) if test "$F90" = ifc; then
843 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
844                      PREPFLAG="-fpp1 "
845                  fi;;
846    *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 762 | Line 853 | if test "$ac_test_PREPFLAG" != "set"; then
853    esac
854  
855    if test -z "$PREPFLAG"; then
856 <        echo ""
766 <        echo "**********************************************************"
767 <        echo "* WARNING: Don't know the best PREPFLAG for this system  *"
768 <        echo "* Use  make PREPFLAG=..., or edit the top level Makefile *"
769 <        echo "* (otherwise, an empty PREPFLAG will be used)            *"
770 <        echo "**********************************************************"
771 <        echo ""
856 >        AC_MSG_WARN("Using empty PREPFLAG")
857          PREPFLAG=""
858    fi
859  
# Line 790 | Line 875 | if test "$ac_test_PREPFLAG" != "set"; then
875    ac_ext=$ac_save_ext
876    AC_LANG_RESTORE()
877  
793
878    if test "$prepflagworks" = 1; then
879      AC_MSG_RESULT(yes)
880      AC_SUBST(PREPFLAG)
# Line 814 | Line 898 | if test "$ac_test_PREPDEFFLAG" != "set"; then
898    PREPDEFFLAG=""
899    case "${host_cpu}-${host_os}" in
900  
901 <  *linux*) if test "$F90" = ifc; then
901 >  *linux*) if test "$F90" = ifc -o "$F90" = ifort; then
902                      PREPDEFFLAG=" "
903                  fi;;
904    *aix*)  if test "$F90" = xlf90 -o "$F90" = f90; then
# Line 827 | Line 911 | if test "$ac_test_PREPDEFFLAG" != "set"; then
911    esac
912  
913    if test -z "$PREPDEFFLAG"; then
914 <        echo ""
831 <        echo "*************************************************************"
832 <        echo "* WARNING: Don't know the best PREPDEFFLAG for this system  *"
833 <        echo "* Use  make PREPDEFFLAG=..., or edit the top level Makefile *"
834 <        echo "* (otherwise, an empty PREPDEFFLAG will be used)            *"
835 <        echo "*************************************************************"
836 <        echo ""
914 >        AC_MSG_WARN("Using empty PREPDEFFLAG")
915          PREPDEFFLAG=" "
916    fi
917  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines