Changeset 4138


Ignore:
Timestamp:
Mar 19, 2020 1:20:03 PM (2 weeks ago)
Author:
stefan
Message:

use AM_CFLAGS instead of CFLAGS, rerun autotools, add ar-lib

  • the remaining automake warning I'm not going to fix
Location:
ThirdParty/Mumps/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Mumps/trunk/Makefile.am

    r4121 r4138  
    22# All Rights Reserved.
    33# This file is distributed under the Eclipse Public License.
    4 
    5 AUTOMAKE_OPTIONS = foreign subdir-objects
    64
    75EXTRA_DIST = get.Mumps INSTALL.MUMPS
     
    7472CLEANFILES = *.mod
    7573
    76 CFLAGS += $(MY_DEFS) $(MUMPS_CFLAGS)
     74AM_CFLAGS = $(MY_DEFS) $(MUMPS_CFLAGS)
    7775FCFLAGS += $(MY_FDEFS)
    7876
    79 # automake thinks that the .F files are F77, not FC, and requires F77 to be set
     77# automake thinks that the .F files are F77, not F95, and requires F77 to be set
    8078# set it to FC, and same for FFLAGS
    8179F77 = $(FC)
  • ThirdParty/Mumps/trunk/Makefile.in

    r4121 r4138  
    277277CC = @CC@
    278278CCDEPMODE = @CCDEPMODE@
    279 CFLAGS = @CFLAGS@ $(MY_DEFS) $(MUMPS_CFLAGS)
     279CFLAGS = @CFLAGS@
    280280COIN_PKG_CONFIG_PATH = @COIN_PKG_CONFIG_PATH@
    281281CPP = @CPP@
     
    398398top_builddir = @top_builddir@
    399399top_srcdir = @top_srcdir@
    400 AUTOMAKE_OPTIONS = foreign subdir-objects
    401400EXTRA_DIST = get.Mumps INSTALL.MUMPS
    402401lib_LTLIBRARIES = libcoinmumps.la
     
    438437# Module files that need to be deleted
    439438CLEANFILES = *.mod
     439AM_CFLAGS = $(MY_DEFS) $(MUMPS_CFLAGS)
    440440
    441441# automake thinks that the .F files are F77, not FC, and requires F77 to be set
  • ThirdParty/Mumps/trunk/configure

    r4127 r4138  
    671671MANIFEST_TOOL
    672672RANLIB
    673 ac_ct_AR
    674 AR
    675673LN_S
    676674NM
     
    686684DLLTOOL
    687685AS
     686ac_ct_AR
     687AR
    688688ADD_FCFLAGS
    689689ac_ct_FC
     
    25522552      : ${CFLAGS:="-nologo -Z7 -MDd $ADD_CFLAGS"}
    25532553      : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd $ADD_CXXFLAGS"}
    2554       : ${AR:="lib"}
    2555       : ${AR_FLAGS:="-nologo -out:"}
    25562554    else
    25572555      : ${FFLAGS:="-g $ADD_FFLAGS"}
     
    25662564      : ${CFLAGS:="-nologo -DNDEBUG -O2 -MD $ADD_CFLAGS"}
    25672565      : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD $ADD_CXXFLAGS"}
    2568       : ${AR:="lib"}
    2569       : ${AR_FLAGS:="-nologo -out:"}
    25702566    else
    25712567      : ${FFLAGS:="-O2 $ADD_FFLAGS"}
     
    31533149
    31543150# Initialize automake
     3151# - do not be as strict as for GNU projects
    31553152# - don't AC_DEFINE PACKAGE or VERSION (but there're still defined as shell
    31563153#   variables in configure, and as make variables).
    31573154# - disable dist target
     3155# - place objects from sources in subdirs into corresponding subdirs
    31583156# - enable all automake warnings
    31593157
     
    34613459      ac_cv_prog_CC="$CC"
    34623460      LD="$CC"
     3461      : ${AR:=lib}
    34633462    else
    34643463      as_fn_error $? "Neither MS nor Intel C compiler found in PATH and CC is unset." "$LINENO" 5
     
    46034602
    46044603# Initialize libtool
     4604
    46054605case `pwd` in
    46064606  *\ * | *\     *)
     
    60896089sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
    60906090test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
    6091 
    60926091
    60936092
     
    83078306
    83088307
     8308# checkout AR and decide whether to use ar-lib wrapper
     8309  if test -n "$ac_tool_prefix"; then
     8310  for ac_prog in ar lib "link -lib"
     8311  do
     8312    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     8313set dummy $ac_tool_prefix$ac_prog; ac_word=$2
     8314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8315$as_echo_n "checking for $ac_word... " >&6; }
     8316if ${ac_cv_prog_AR+:} false; then :
     8317  $as_echo_n "(cached) " >&6
     8318else
     8319  if test -n "$AR"; then
     8320  ac_cv_prog_AR="$AR" # Let the user override the test.
     8321else
     8322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8323for as_dir in $PATH
     8324do
     8325  IFS=$as_save_IFS
     8326  test -z "$as_dir" && as_dir=.
     8327    for ac_exec_ext in '' $ac_executable_extensions; do
     8328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8329    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     8330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8331    break 2
     8332  fi
     8333done
     8334  done
     8335IFS=$as_save_IFS
     8336
     8337fi
     8338fi
     8339AR=$ac_cv_prog_AR
     8340if test -n "$AR"; then
     8341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
     8342$as_echo "$AR" >&6; }
     8343else
     8344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8345$as_echo "no" >&6; }
     8346fi
     8347
     8348
     8349    test -n "$AR" && break
     8350  done
     8351fi
     8352if test -z "$AR"; then
     8353  ac_ct_AR=$AR
     8354  for ac_prog in ar lib "link -lib"
     8355do
     8356  # Extract the first word of "$ac_prog", so it can be a program name with args.
     8357set dummy $ac_prog; ac_word=$2
     8358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     8359$as_echo_n "checking for $ac_word... " >&6; }
     8360if ${ac_cv_prog_ac_ct_AR+:} false; then :
     8361  $as_echo_n "(cached) " >&6
     8362else
     8363  if test -n "$ac_ct_AR"; then
     8364  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
     8365else
     8366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     8367for as_dir in $PATH
     8368do
     8369  IFS=$as_save_IFS
     8370  test -z "$as_dir" && as_dir=.
     8371    for ac_exec_ext in '' $ac_executable_extensions; do
     8372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     8373    ac_cv_prog_ac_ct_AR="$ac_prog"
     8374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     8375    break 2
     8376  fi
     8377done
     8378  done
     8379IFS=$as_save_IFS
     8380
     8381fi
     8382fi
     8383ac_ct_AR=$ac_cv_prog_ac_ct_AR
     8384if test -n "$ac_ct_AR"; then
     8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
     8386$as_echo "$ac_ct_AR" >&6; }
     8387else
     8388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     8389$as_echo "no" >&6; }
     8390fi
     8391
     8392
     8393  test -n "$ac_ct_AR" && break
     8394done
     8395
     8396  if test "x$ac_ct_AR" = x; then
     8397    AR="false"
     8398  else
     8399    case $cross_compiling:$ac_tool_warned in
     8400yes:)
     8401{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     8402$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     8403ac_tool_warned=yes ;;
     8404esac
     8405    AR=$ac_ct_AR
     8406  fi
     8407fi
     8408
     8409: ${AR=ar}
     8410
     8411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
     8412$as_echo_n "checking the archiver ($AR) interface... " >&6; }
     8413if ${am_cv_ar_interface+:} false; then :
     8414  $as_echo_n "(cached) " >&6
     8415else
     8416  ac_ext=c
     8417ac_cpp='$CPP $CPPFLAGS'
     8418ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     8419ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     8420ac_compiler_gnu=$ac_cv_c_compiler_gnu
     8421
     8422   am_cv_ar_interface=ar
     8423   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     8424/* end confdefs.h.  */
     8425int some_variable = 0;
     8426_ACEOF
     8427if ac_fn_c_try_compile "$LINENO"; then :
     8428  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
     8429      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
     8430  (eval $am_ar_try) 2>&5
     8431  ac_status=$?
     8432  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     8433  test $ac_status = 0; }
     8434      if test "$ac_status" -eq 0; then
     8435        am_cv_ar_interface=ar
     8436      else
     8437        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
     8438        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
     8439  (eval $am_ar_try) 2>&5
     8440  ac_status=$?
     8441  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     8442  test $ac_status = 0; }
     8443        if test "$ac_status" -eq 0; then
     8444          am_cv_ar_interface=lib
     8445        else
     8446          am_cv_ar_interface=unknown
     8447        fi
     8448      fi
     8449      rm -f conftest.lib libconftest.a
     8450
     8451fi
     8452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     8453   ac_ext=c
     8454ac_cpp='$CPP $CPPFLAGS'
     8455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     8456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     8457ac_compiler_gnu=$ac_cv_c_compiler_gnu
     8458
     8459fi
     8460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
     8461$as_echo "$am_cv_ar_interface" >&6; }
     8462
     8463case $am_cv_ar_interface in
     8464ar)
     8465  ;;
     8466lib)
     8467  # Microsoft lib, so override with the ar-lib wrapper script.
     8468  # FIXME: It is wrong to rewrite AR.
     8469  # But if we don't then we get into trouble of one sort or another.
     8470  # A longer-term fix would be to have automake use am__AR in this case,
     8471  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
     8472  # similar.
     8473  AR="$am_aux_dir/ar-lib $AR"
     8474  ;;
     8475unknown)
     8476  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
     8477  ;;
     8478esac
     8479
     8480
    83098481# Create libtool.
    8310 
    83118482
    83128483
     
    1601116182# Patch libtool to circumvent some issues when using MSVC and MS lib.
    1601216183# This needs to be run after config.status has created libtool.
    16013 # 1. Eliminate a trailing space after AR_FLAGS. Apparently necessary on
    16014 #    Windows when AR=lib.exe.
    16015 # 2. Patch libtool's func_extract_an_archive in case of $AR=lib. The current
    16016 #    libtool implementation assumes that it can do $AR x to extract an archive.
    16017 #    We replace this two-liner in func_extract_an_archive by replacing the first
    16018 #    line by something clunky that works with lib and making sure that the following
    16019 #    line is ignored (by finishing with ": \"). We completely disregard running the
    16020 #    command through func_show_eval and do not stop if it fails.
    16021 # 3. Relax check which libraries can be used when linking a DLL.
     16184# 1. Relax check which libraries can be used when linking a DLL.
    1602216185#    libtool's func_mode_link() would reject linking a .lib file when building a DLL,
    1602316186#    even though this .lib file may just be the one that eventually loads a depending DLL,
    1602416187#    e.g., mkl_core_dll.lib. Setting deplibs_check_method=pass_all will still print a
    1602516188#    warning, but the .lib is still passed to the linker.
    16026 # 4. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
     16189# 2. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
    1602716190#    libtool forces always_export_symbols=yes for --tag=CXX if using MS compiler.
    1602816191#    This leads to a nm call that collects ALL C-functions from a library
    1602916192#    and explicitly dll-exporting them, leading to warnings about duplicates
    1603016193#    regarding those that are properly marked for dll-export in the source.
    16031 # 5. Do not add mkl_*.lib to old_deplibs, which can result in trying to unpack and repack
     16194# 3. Do not add mkl_*.lib to old_deplibs, which can result in trying to unpack and repack
    1603216195#    the MKL libraries (which are pretty big). Instead, treat them like other -l<...> libs.
    16033 # 6. Add MKL libraries to dependency_libs in .la file, which I guess should be
     16196# 4. Add MKL libraries to dependency_libs in .la file, which I guess should be
    1603416197#    the case due to point 5.
    1603516198#
     
    1604216205#    this faulty check.
    1604316206
    16044   case "$AR" in
    16045     *lib* | *LIB* )
     16207  case "$am_cv_ar_interface" in
     16208    lib )
    1604616209      ac_config_commands="$ac_config_commands libtoolclpatch"
    1604716210
     
    2093221095
    2093321096 ;;
    20934     "libtoolclpatch":C) sed -e 's|AR_FLAGS |AR_FLAGS|g' \
    20935              -e '/$AR x/s/.*/( cd $f_ex_an_ar_dir ; for f in `$AR -nologo -list "$f_ex_an_ar_oldlib" | tr "\\r" " "` ; do lib -nologo -extract:$f "$f_ex_an_ar_oldlib"; done ); : \\/g' \
    20936              -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
     21097    "libtoolclpatch":C) sed -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
    2093721098             -e 's|always_export_symbols=yes|always_export_symbols=no|g' \
    2093821099             -e '/func_append old_deplibs/s/\(.*\)/case $arg in *mkl_*.lib) ;; *) \1 ;; esac/g' \
Note: See TracChangeset for help on using the changeset viewer.