Changeset 264


Ignore:
Timestamp:
Mar 26, 2007 4:21:21 PM (14 years ago)
Author:
andreasw
Message:

making trunk (rev 263) the new stable version, still 0.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.5/coin.m4

    r242 r264  
    1 # Copyright (C) 2006 International Business Machines..
     1# Copyright (C) 2006, 2007 International Business Machines..
    22# All Rights Reserved.
    33# This file is distributed under the Common Public License.
     
    13311331       coin_f77_comps="ifort fl32"
    13321332     else
    1333        coin_f77_comps="gfortran g77 ifort fl32"
     1333       coin_f77_comps="gfortran ifort g77 fl32"
    13341334     fi ;;
    13351335  sparc-sun-solaris*)
     
    17781778
    17791779  case $build in
     1780    *x86_64-*)
     1781# Here we need to check if -m32 is specified.  If so, we need to correct sys_lib_search_path_spec
     1782      if test "$GCC" = yes && (echo $CXXFLAGS $CFLAGS $FFLAGS | $EGREP 'm32' >& /dev/null); then
     1783        AC_MSG_NOTICE(Applying patches to libtool for 32bit compilation)
     1784        sed -e 's|sys_lib_search_path_spec=".*"|sys_lib_search_path_spec="/lib /usr/lib"|' libtool > conftest.bla
     1785        mv conftest.bla libtool
     1786        chmod 755 libtool 
     1787      fi
     1788      ;;
    17801789    *-cygwin* | *-mingw*)
    17811790    case "$CXX" in
     
    18831892# things (such as generating links to data files in a VPATH configuration).
    18841893# It also prints the "success" message.
     1894# Note: If the variable coin_skip_ac_output is set to yes, then no output
     1895# files are written.
    18851896
    18861897AC_DEFUN([AC_COIN_FINALIZE],
    18871898[
    1888 FADDLIBS="$ADDLIBS"
    1889 if test x"$coin_need_flibs" = xyes; then
    1890   ADDLIBS="$ADDLIBS $FLIBS"
    1891 fi
    1892 
    1893 # library extension
    1894 AC_SUBST(LIBEXT)
    1895 case "$CC" in
    1896   cl* | */cl* | CL* | */CL*)
    1897        LIBEXT=lib ;;
    1898     *) LIBEXT=a ;;
    1899 esac
    1900 
    1901 # Define VPATH_DISTCLEANFILES to be everything that needs to be
    1902 # cleaned for distclean in a vpath configuration
    1903 AC_SUBST(VPATH_DISTCLEANFILES)
    1904 VPATH_DISTCLEANFILES="$coin_vpath_link_files"
    1905 
    1906 AC_OUTPUT
    1907 
    1908 if test x"$coin_vpath_link_files" = x; then : ; else
    1909   lnkcmd=
    1910   if test "$enable_doscompile" = yes; then
    1911     lnkcmd=cp
    1912   fi
     1899if test x$coin_skip_ac_output != xyes; then
     1900
     1901  FADDLIBS="$ADDLIBS"
     1902  if test x"$coin_need_flibs" = xyes; then
     1903    ADDLIBS="$ADDLIBS $FLIBS"
     1904  fi
     1905
     1906  # library extension
     1907  AC_SUBST(LIBEXT)
    19131908  case "$CC" in
    19141909    cl* | */cl* | CL* | */CL*)
    1915       lnkcmd=cp ;;
     1910         LIBEXT=lib ;;
     1911      *) LIBEXT=a ;;
    19161912  esac
    1917   if test "$lnkcmd" = cp; then
    1918     AC_MSG_NOTICE(Copying data files for VPATH configuration)
     1913
     1914  # Define VPATH_DISTCLEANFILES to be everything that needs to be
     1915  # cleaned for distclean in a vpath configuration
     1916  AC_SUBST(VPATH_DISTCLEANFILES)
     1917  VPATH_DISTCLEANFILES="$coin_vpath_link_files"
     1918
     1919  # Take out subdirectories if their configuration concluded that they
     1920  # don't need to be compiled
     1921  if test x"$coin_ac_skip_subdirs" != x; then
     1922    new_subdirs=
     1923    for i in $subdirs; do
     1924      skipme=no
     1925      for j in $coin_ac_skip_subdirs; do
     1926        if test $i = $j; then
     1927          skipme=yes;
     1928        fi
     1929      done
     1930      if test $skipme = no; then
     1931        new_subdirs="$new_subdirs $i"
     1932      fi
     1933    done
     1934    subdirs="$new_subdirs"
     1935  fi
     1936
     1937  AC_OUTPUT
     1938
     1939  if test x"$coin_vpath_link_files" = x; then : ; else
     1940    lnkcmd=
     1941    if test "$enable_doscompile" = yes; then
     1942      lnkcmd=cp
     1943    fi
     1944    case "$CC" in
     1945      cl* | */cl* | CL* | */CL*)
     1946        lnkcmd=cp ;;
     1947    esac
     1948    if test "$lnkcmd" = cp; then
     1949      AC_MSG_NOTICE(Copying data files for VPATH configuration)
     1950    else
     1951      AC_PROG_LN_S
     1952      AC_MSG_NOTICE(Creating VPATH links for data files)
     1953      lnkcmd="$LN_S"
     1954    fi
     1955    for file in $coin_vpath_link_files; do
     1956      dir=`AS_DIRNAME(["./$file"])`
     1957      if test -d $dir; then : ; else
     1958        AS_MKDIR_P($dir)
     1959      fi
     1960      rm -f $file
     1961      $lnkcmd $abs_source_dir/$file $file
     1962    done
     1963  fi
     1964
     1965  if test x$coin_projectdir = xyes; then
     1966    AC_MSG_NOTICE([Configuration of $PACKAGE_NAME successful])
    19191967  else
    1920     AC_PROG_LN_S
    1921     AC_MSG_NOTICE(Creating VPATH links for data files)
    1922     lnkcmd="$LN_S"
    1923   fi
    1924   for file in $coin_vpath_link_files; do
    1925     dir=`AS_DIRNAME(["./$file"])`
    1926     if test -d $dir; then : ; else
    1927       AS_MKDIR_P($dir)
    1928     fi
    1929     rm -f $file
    1930     $lnkcmd $abs_source_dir/$file $file
    1931   done
    1932 fi
    1933 
    1934 if test x$coin_projectdir = xyes; then
    1935   AC_MSG_NOTICE([Configuration of $PACKAGE_NAME successful])
     1968    AC_MSG_NOTICE([Main configuration of $PACKAGE_NAME successful])
     1969  fi
    19361970else
    1937   AC_MSG_NOTICE([Main configuration of $PACKAGE_NAME successful])
    1938 fi
     1971  AC_MSG_NOTICE([No configuration of $PACKAGE_NAME necessary])
     1972fi
     1973
    19391974]) #AC_COIN_FINALIZE
    19401975
     
    23502385
    23512386if test "$use_asldir" = BUILD; then
    2352   AC_CHECK_FILE([$coin_aslobjdir/Makefile],[],
    2353                 [AC_MSG_ERROR([option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)])])
     2387  if test "$PACKAGE_NAME" != ThirdPartyASL; then
     2388    # If we are configuring ThirdParty/ASL, don't check
     2389    if test -r $coin_aslobjdir/.MakeOk; then :; else
     2390      AC_MSG_ERROR([option \"BUILD\" specified for asldir, but directory is not configure (sources missing?)])
     2391    fi
     2392  fi
    23542393elif test -z "$use_asldir"; then
    23552394 # try to find sources - if not given don't compile
    2356   AC_CHECK_FILE([$coin_aslobjdir/Makefile],[use_asldir=BUILD],[use_asldir=no])
     2395  if test "$PACKAGE_NAME" != ThirdPartyASL; then
     2396    if test -r $coin_aslobjdir/.MakeOk; then
     2397      use_asldir=BUILD
     2398    else
     2399      use_asldir=no
     2400    fi
     2401  else
     2402    use_asldir=no
     2403  fi
    23572404elif test "$use_asldir" != "no"; then
    23582405  AC_CHECK_FILE([$use_asldir/$ampllib],[],
     
    24762523
    24772524AC_DEFUN([AC_COIN_HAS_BLAS],
    2478 [coin_blasobjdir=../ThirdParty/Blas
     2525[if test "$PACKAGE_NAME" = ThirdPartyBlas || test "$PACKAGE_NAME" = ThirdPartyLapack; then
     2526  coin_blasobjdir=../Blas
     2527else
     2528  coin_blasobjdir=../ThirdParty/Blas
     2529fi
    24792530coin_blassrcdir=$srcdir/$coin_blasobjdir
    24802531
     
    24842535            [use_blas=$withval], [use_blas=])
    24852536
     2537MAKEOKFILE=.MakeOk
    24862538# Check if user supplied option makes sense
    24872539if test x"$use_blas" != x; then
    24882540  if test "$use_blas" = "BUILD"; then
    2489     AC_CHECK_FILE([$coin_blasobjdir/Makefile],[],
    2490                   [AC_MSG_ERROR([option \"BUILD\" specified for Blas, but $coin_blasobjdir directory is not configured])])
     2541    # Don't check for course code if this is executed in ThirdParty/Blas
     2542    if test "$PACKAGE_NAME" != ThirdPartyBlas; then
     2543      if test -r $coin_blasobjdir/.MakeOk; then :; else
     2544        AC_MSG_ERROR([option \"BUILD\" specified for Blas, but $coin_blasobjdir directory is not properly configured])
     2545      fi
     2546    fi
    24912547  elif test "$use_blas" != no ; then
    24922548    AC_MSG_CHECKING([whether user supplied BLASLIB=\"$use_blas\" works])
     
    25002556else
    25012557# Try to autodetect the library for blas based on build system
    2502   AC_MSG_CHECKING([default locations for BLAS])
     2558  #AC_MSG_CHECKING([default locations for BLAS])
     2559  skip_lblas_check=no
    25032560  case $build in
    25042561    *-sgi-*)
     
    25272584# library will want to link with cygwin, hence won't run standalone in DOS.
    25282585    *-cygwin*)
    2529       if test "$enable_doscompile" = no; then
    2530         if test -z "$use_blas"; then
    2531           SAVE_LIBS="$LIBS"
    2532           AC_MSG_CHECKING([whether -lblas has BLAS])
    2533           LIBS="-lblas $LIBS"
    2534           AC_COIN_TRY_FLINK([daxpy],
    2535                             [AC_MSG_RESULT([yes])
    2536                              ADDLIBS="-lblas $ADDLIBS"
    2537                              use_blas='-lblas'],
    2538                             [AC_MSG_RESULT([no])
    2539                              LIBS="$SAVE_LIBS"])
    2540         fi
     2586      if test "$enable_doscompile" = mingw; then
     2587        skip_lblas_check=yes
    25412588      fi
    25422589      ;;
    2543     esac
     2590  esac
     2591
     2592  if test -z "$use_blas" && test $skip_lblas_check = no; then
     2593    SAVE_LIBS="$LIBS"
     2594    AC_MSG_CHECKING([whether -lblas has BLAS])
     2595    LIBS="-lblas $LIBS"
     2596    AC_COIN_TRY_FLINK([daxpy],
     2597                      [AC_MSG_RESULT([yes])
     2598                       ADDLIBS="-lblas $ADDLIBS"
     2599                       use_blas='-lblas'],
     2600                      [AC_MSG_RESULT([no])
     2601                       LIBS="$SAVE_LIBS"])
     2602  fi
    25442603
    25452604# If we have no other ideas, consider building BLAS.
    25462605  if test -z "$use_blas"; then
    2547     AC_MSG_CHECKING([if BLAS can be built.])
    2548     AC_CHECK_FILE([$coin_blasobjdir/Makefile],[use_blas=BUILD])
     2606    if test "$PACKAGE_NAME" != ThirdPartyBlas; then
     2607      if test -r $coin_blasobjdir/.MakeOk; then
     2608        use_blas=BUILD
     2609      fi
     2610    fi
    25492611  fi
    25502612fi
     
    25912653if test x"$use_lapack" != x; then
    25922654  if test "$use_lapack" = "BUILD"; then
    2593     AC_CHECK_FILE([$coin_lapackobjdir/Makefile],[],
    2594                   [AC_MSG_ERROR([option \"BUILD\" specified for LAPACK, but $coin_lapackobjdir directory is not configured])])
     2655    # Don't check for course code if this is executed in ThirdParty/Blas
     2656    if test "$PACKAGE_NAME" != ThirdPartyLapack; then
     2657      if test -r $coin_lapackobjdir/.MakeOk; then :; else
     2658        AC_MSG_ERROR([option \"BUILD\" specified for LAPACK, but $coin_lapackobjdir directory is not configured])
     2659      fi
     2660    fi
    25952661  else
    25962662    AC_MSG_CHECKING([whether user supplied LAPACKLIB=\"$use_lapack\" works])
     
    26102676                      [AC_MSG_RESULT([no])])
    26112677  fi
     2678  skip_llapack_check=no
    26122679  if test -z "$use_lapack"; then
    26132680    # Try to autodetect the library for lapack based on build system
     
    26382705# will want to link with cygwin, hence won't run standalone in DOS.
    26392706      *-cygwin*)
    2640         if test "$enable_doscompile" = no; then
    2641           if test -z "$use_lapack"; then
    2642             SAVE_LIBS="$LIBS"
    2643             AC_MSG_CHECKING([whether -llapack has LAPACK])
    2644             LIBS="-llapack $LIBS"
    2645             AC_COIN_TRY_FLINK([dsyev],
    2646                               [AC_MSG_RESULT([yes])
    2647                                ADDLIBS="-llapack $ADDLIBS"
    2648                                use_lapack='-llapack'],
    2649                               [AC_MSG_RESULT([no])
    2650                                LIBS="$SAVE_LIBS"])
    2651           fi
     2707        if test "$enable_doscompile" = mingw; then
     2708          skip_llapack_check=yes
    26522709        fi
    26532710        ;;
    26542711    esac
    26552712  fi
     2713
     2714  if test -z "$use_lapack" && test $skip_llapack_check = no; then
     2715    SAVE_LIBS="$LIBS"
     2716    AC_MSG_CHECKING([whether -llapack has LAPACK])
     2717    LIBS="-llapack $LIBS"
     2718    AC_COIN_TRY_FLINK([dsyev],
     2719                      [AC_MSG_RESULT([yes])
     2720                       ADDLIBS="-llapack $ADDLIBS"
     2721                       use_lapack='-llapack'],
     2722                      [AC_MSG_RESULT([no])
     2723                       LIBS="$SAVE_LIBS"])
     2724  fi
     2725
    26562726# If we have no other ideas, consider building LAPACK.
    26572727  if test -z "$use_lapack"; then
    2658     AC_CHECK_FILE([$coin_lapackobjdir/Makefile],[use_lapack=BUILD])
     2728    if test "$PACKAGE_NAME" != ThirdPartyLapack; then
     2729      if test -r $coin_lapackobjdir/.MakeOk; then
     2730        use_lapack=BUILD
     2731      fi
     2732    fi
    26592733  fi
    26602734fi
     
    26752749fi
    26762750]) # AC_COIN_HAS_LAPACK
     2751
     2752###########################################################################
     2753#                            COIN_HAS_MUMPS                               #
     2754###########################################################################
     2755
     2756# This macro checks for a library containing the MUMPS library.  It
     2757# checks if the user has provided an argument for the MUMPS library,
     2758# and if not, it checks whether the MUMPS ThirdParty/Mumps directory has
     2759# been configured.  It adds to ADDLIBS any flags required to link with
     2760# an externally provided MUMPS.  It defines the makefile conditional
     2761# and preprocessor macro COIN_HAS_MUMPS, if MUMPS is available, and it
     2762# defines the makefile conditional COIN_BUILD_MUMPS, if MUMPS is
     2763# compiled within COIN.
     2764
     2765AC_DEFUN([AC_COIN_HAS_MUMPS],
     2766[
     2767if test "$PACKAGE_NAME" = ThirdPartyMumps; then
     2768  coin_mumpsobjdir=../Mumps
     2769else
     2770  coin_mumpsobjdir=../ThirdParty/Mumps
     2771fi
     2772coin_mumpssrcdir=$abs_source_dir/$coin_mumpsobjdir
     2773
     2774mumps_ver=4.6.4
     2775
     2776MAKEOKFILE=.MakeOk
     2777
     2778AC_ARG_WITH([mumps-dir],
     2779            AC_HELP_STRING([--with-mumps-dir],
     2780                           [specify directory where MUMPS is installed]),
     2781            [use_mumps="$withval"], [use_mumps=no])
     2782
     2783if test "$use_mumps" != "no"; then
     2784  if test -d $use_mumps; then :; else
     2785    AC_MSG_ERROR([User provided MUMPS directory $use_mumps does not exist.])
     2786  fi
     2787  mumps_dir=`cd $use_mumps; pwd`
     2788
     2789  # library extension
     2790  AC_LANG_PUSH(C)
     2791  save_LIBS="$LIBS"
     2792  LIBS="$LIBS $FLIBS"
     2793  AC_CHECK_LIB([pthread],[pthread_create],[LIBS="-lpthread $save_LIBS"; ADDLIBS="-lpthread $ADDLIBS"],[LIBS="$save_LIBS"])
     2794  AC_LANG_POP(C)
     2795
     2796  case "$CC" in
     2797    cl* | */cl* | CL* | */CL*)
     2798         libe=lib ;;
     2799      *) libe=a ;;
     2800  esac
     2801
     2802  # Check if hearders are there
     2803  AC_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
     2804                [],
     2805                [AC_MSG_ERROR([I cannot find headers for MUMPS])])
     2806  LIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $LIBS"
     2807  ADDLIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $ADDLIBS"
     2808  # Check if MUMPS actually works
     2809  AC_LANG_PUSH(C)
     2810  save_LIBS="$LIBS"
     2811  LIBS="$LIBS $FLIBS"
     2812  AC_TRY_LINK([void dmumps_c();],[dmumps_c()],[],
     2813              [AC_MSG_ERROR([User provided MUMPS library doesn't work])])
     2814  LIBS="$save_LIBS"
     2815  AC_LANG_POP(C)
     2816
     2817else
     2818  use_mumps=BUILD
     2819
     2820  # Check if the MUMPS' ThirdParty project has been configured
     2821  if test "$PACKAGE_NAME" != ThirdPartyMumps; then
     2822    if test -r $coin_mumpsobjdir/.MakeOk; then
     2823      use_mumps=BUILD
     2824      # Mumps needs pthreads
     2825      AC_LANG_PUSH(C)
     2826      save_LIBS="$LIBS"
     2827      LIBS="$LIBS $FLIBS"
     2828      AC_CHECK_LIB([pthread],[pthread_create],[LIBS="-lpthread $save_LIBS"; ADDLIBS="-lpthread $ADDLIBS"],[LIBS="save_LIBS"])
     2829      AC_LANG_POP(C)
     2830    else
     2831      use_mumps=
     2832    fi
     2833  fi
     2834fi
     2835
     2836if test x"$use_mumps" != x; then
     2837
     2838  # and we need the Fortran runtime libraries if we want to link with C/C++
     2839  coin_need_flibs=yes
     2840
     2841  MUMPS_INCFLAGS="-I`$CYGPATH_W $coin_mumpssrcdir/MUMPS_${mumps_ver}/libseq` -I`$CYGPATH_W $coin_mumpssrcdir/MUMPS_${mumps_ver}/include`"
     2842  AC_SUBST(MUMPS_INCFLAGS)
     2843fi
     2844
     2845AM_CONDITIONAL([COIN_HAS_MUMPS],[test x"$use_mumps" != x])
     2846AM_CONDITIONAL([COIN_BUILD_MUMPS],[test "$use_mumps" = BUILD])
     2847
     2848if test x"$use_mumps" = x || test "$use_mumps" = no; then
     2849  coin_has_mumps=no
     2850else
     2851  coin_has_mumps=yes
     2852  AC_DEFINE([COIN_HAS_MUMPS],[1],
     2853            [If defined, the MUMPS Library is available.])
     2854fi
     2855]) # AC_COIN_HAS_MUMPS
     2856
Note: See TracChangeset for help on using the changeset viewer.