Changeset 4133


Ignore:
Timestamp:
Mar 19, 2020 12:53:42 PM (2 weeks ago)
Author:
stefan
Message:

rerun autotools, add ar-lib

Location:
ThirdParty/Glpk/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • ThirdParty/Glpk/trunk/configure

    r4130 r4133  
    19211921      : ${CFLAGS:="-nologo -Z7 -MDd $ADD_CFLAGS"}
    19221922      : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd $ADD_CXXFLAGS"}
    1923       : ${AR:="lib"}
    1924       : ${AR_FLAGS:="-nologo -out:"}
    19251923    else
    19261924      : ${FFLAGS:="-g $ADD_FFLAGS"}
     
    19351933      : ${CFLAGS:="-nologo -DNDEBUG -O2 -MD $ADD_CFLAGS"}
    19361934      : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD $ADD_CXXFLAGS"}
    1937       : ${AR:="lib"}
    1938       : ${AR_FLAGS:="-nologo -out:"}
    19391935    else
    19401936      : ${FFLAGS:="-O2 $ADD_FFLAGS"}
  • ThirdParty/Glpk/trunk/glpk_config_files/aclocal.m4

    r4130 r4133  
    5656  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
    5757_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
     58
     59# Copyright (C) 2011-2018 Free Software Foundation, Inc.
     60#
     61# This file is free software; the Free Software Foundation
     62# gives unlimited permission to copy and/or distribute it,
     63# with or without modifications, as long as this notice is preserved.
     64
     65# AM_PROG_AR([ACT-IF-FAIL])
     66# -------------------------
     67# Try to determine the archiver interface, and trigger the ar-lib wrapper
     68# if it is needed.  If the detection of archiver interface fails, run
     69# ACT-IF-FAIL (default is to abort configure with a proper error message).
     70AC_DEFUN([AM_PROG_AR],
     71[AC_BEFORE([$0], [LT_INIT])dnl
     72AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
     73AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
     74AC_REQUIRE_AUX_FILE([ar-lib])dnl
     75AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
     76: ${AR=ar}
     77
     78AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
     79  [AC_LANG_PUSH([C])
     80   am_cv_ar_interface=ar
     81   AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
     82     [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
     83      AC_TRY_EVAL([am_ar_try])
     84      if test "$ac_status" -eq 0; then
     85        am_cv_ar_interface=ar
     86      else
     87        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
     88        AC_TRY_EVAL([am_ar_try])
     89        if test "$ac_status" -eq 0; then
     90          am_cv_ar_interface=lib
     91        else
     92          am_cv_ar_interface=unknown
     93        fi
     94      fi
     95      rm -f conftest.lib libconftest.a
     96     ])
     97   AC_LANG_POP([C])])
     98
     99case $am_cv_ar_interface in
     100ar)
     101  ;;
     102lib)
     103  # Microsoft lib, so override with the ar-lib wrapper script.
     104  # FIXME: It is wrong to rewrite AR.
     105  # But if we don't then we get into trouble of one sort or another.
     106  # A longer-term fix would be to have automake use am__AR in this case,
     107  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
     108  # similar.
     109  AR="$am_aux_dir/ar-lib $AR"
     110  ;;
     111unknown)
     112  m4_default([$1],
     113             [AC_MSG_ERROR([could not determine $AR interface])])
     114  ;;
     115esac
     116AC_SUBST([AR])dnl
     117])
    58118
    59119# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
     
    13051365      : ${CFLAGS:="-nologo -Z7 -MDd $ADD_CFLAGS"}
    13061366      : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd $ADD_CXXFLAGS"}
    1307       : ${AR:="lib"}
    1308       : ${AR_FLAGS:="-nologo -out:"}
    13091367    else
    13101368      : ${FFLAGS:="-g $ADD_FFLAGS"}
     
    13191377      : ${CFLAGS:="-nologo -DNDEBUG -O2 -MD $ADD_CFLAGS"}
    13201378      : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD $ADD_CXXFLAGS"}
    1321       : ${AR:="lib"}
    1322       : ${AR_FLAGS:="-nologo -out:"}
    13231379    else
    13241380      : ${FFLAGS:="-O2 $ADD_FFLAGS"}
     
    14661522AC_DEFUN([AC_COIN_PROG_LIBTOOL],
    14671523[
     1524# checkout AR and decide whether to use ar-lib wrapper
     1525  AM_PROG_AR
     1526
    14681527# Create libtool.
    1469 
    1470   LT_INIT([disable-static pic-only m4_bmatch($1,no-win32-dll,,win32-dll)])
     1528  LT_INIT(disable-static pic-only m4_bmatch($1,no-win32-dll,,win32-dll))
    14711529
    14721530# Patch libtool to circumvent some issues when using MSVC and MS lib.
    14731531# This needs to be run after config.status has created libtool.
    1474 # 1. Eliminate a trailing space after AR_FLAGS. Apparently necessary on
    1475 #    Windows when AR=lib.exe.
    1476 # 2. Patch libtool's func_extract_an_archive in case of $AR=lib. The current
    1477 #    libtool implementation assumes that it can do $AR x to extract an archive.
    1478 #    We replace this two-liner in func_extract_an_archive by replacing the first
    1479 #    line by something clunky that works with lib and making sure that the following
    1480 #    line is ignored (by finishing with ": \"). We completely disregard running the
    1481 #    command through func_show_eval and do not stop if it fails.
    1482 # 3. Relax check which libraries can be used when linking a DLL.
     1532# 1. Relax check which libraries can be used when linking a DLL.
    14831533#    libtool's func_mode_link() would reject linking a .lib file when building a DLL,
    14841534#    even though this .lib file may just be the one that eventually loads a depending DLL,
    14851535#    e.g., mkl_core_dll.lib. Setting deplibs_check_method=pass_all will still print a
    14861536#    warning, but the .lib is still passed to the linker.
    1487 # 4. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
     1537# 2. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
    14881538#    libtool forces always_export_symbols=yes for --tag=CXX if using MS compiler.
    14891539#    This leads to a nm call that collects ALL C-functions from a library
    14901540#    and explicitly dll-exporting them, leading to warnings about duplicates
    14911541#    regarding those that are properly marked for dll-export in the source.
    1492 # 5. Do not add mkl_*.lib to old_deplibs, which can result in trying to unpack and repack
     1542# 3. Do not add mkl_*.lib to old_deplibs, which can result in trying to unpack and repack
    14931543#    the MKL libraries (which are pretty big). Instead, treat them like other -l<...> libs.
    1494 # 6. Add MKL libraries to dependency_libs in .la file, which I guess should be
     1544# 4. Add MKL libraries to dependency_libs in .la file, which I guess should be
    14951545#    the case due to point 5.
    14961546#
     
    15031553#    this faulty check.
    15041554
    1505   case "$AR" in
    1506     *lib* | *LIB* )
     1555  case "$am_cv_ar_interface" in
     1556    lib )
    15071557      AC_CONFIG_COMMANDS([libtoolclpatch],
    1508         [sed -e 's|AR_FLAGS |AR_FLAGS|g' \
    1509              -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' \
    1510              -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
     1558        [sed -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
    15111559             m4_bmatch($1,no-win32-dll,,[-e 's|always_export_symbols=yes|always_export_symbols=no|g']) \
    15121560             -e '/func_append old_deplibs/s/\(.*\)/case $arg in *mkl_*.lib) ;; *) \1 ;; esac/g' \
     
    15801628      ac_cv_prog_CC="$CC"
    15811629      LD="$CC"
     1630      : ${AR:=lib}
    15821631    else
    15831632      AC_MSG_ERROR([Neither MS nor Intel C compiler found in PATH and CC is unset.])
     
    16191668      ac_cv_prog_CXX="$CXX"
    16201669      LD="$CXX"
     1670      : ${AR:=lib}
    16211671    else
    16221672      AC_MSG_ERROR([Neither MS nor Intel C++ compiler found in PATH and CXX is unset.])
  • ThirdParty/Glpk/trunk/glpk_config_files/configure

    r4130 r4133  
    648648MANIFEST_TOOL
    649649RANLIB
    650 ac_ct_AR
    651 AR
    652650LN_S
    653651NM
     
    663661DLLTOOL
    664662AS
     663ac_ct_AR
     664AR
    665665ADD_CFLAGS
    666666am__fastdepCC_FALSE
     
    24112411      : ${CFLAGS:="-nologo -Z7 -MDd $ADD_CFLAGS"}
    24122412      : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd $ADD_CXXFLAGS"}
    2413       : ${AR:="lib"}
    2414       : ${AR_FLAGS:="-nologo -out:"}
    24152413    else
    24162414      : ${FFLAGS:="-g $ADD_FFLAGS"}
     
    24252423      : ${CFLAGS:="-nologo -DNDEBUG -O2 -MD $ADD_CFLAGS"}
    24262424      : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD $ADD_CXXFLAGS"}
    2427       : ${AR:="lib"}
    2428       : ${AR_FLAGS:="-nologo -out:"}
    24292425    else
    24302426      : ${FFLAGS:="-O2 $ADD_FFLAGS"}
     
    33263322      ac_cv_prog_CC="$CC"
    33273323      LD="$CC"
     3324      : ${AR:=lib}
    33283325    else
    33293326      as_fn_error $? "Neither MS nor Intel C compiler found in PATH and CC is unset." "$LINENO" 5
     
    41264123
    41274124# Set up libtool.
     4125
    41284126
    41294127case `pwd` in
     
    56135611sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
    56145612test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
    5615 
    56165613
    56175614
     
    78207817
    78217818
     7819# checkout AR and decide whether to use ar-lib wrapper
     7820  if test -n "$ac_tool_prefix"; then
     7821  for ac_prog in ar lib "link -lib"
     7822  do
     7823    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
     7824set dummy $ac_tool_prefix$ac_prog; ac_word=$2
     7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     7826$as_echo_n "checking for $ac_word... " >&6; }
     7827if ${ac_cv_prog_AR+:} false; then :
     7828  $as_echo_n "(cached) " >&6
     7829else
     7830  if test -n "$AR"; then
     7831  ac_cv_prog_AR="$AR" # Let the user override the test.
     7832else
     7833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     7834for as_dir in $PATH
     7835do
     7836  IFS=$as_save_IFS
     7837  test -z "$as_dir" && as_dir=.
     7838    for ac_exec_ext in '' $ac_executable_extensions; do
     7839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7840    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     7841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     7842    break 2
     7843  fi
     7844done
     7845  done
     7846IFS=$as_save_IFS
     7847
     7848fi
     7849fi
     7850AR=$ac_cv_prog_AR
     7851if test -n "$AR"; then
     7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
     7853$as_echo "$AR" >&6; }
     7854else
     7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7856$as_echo "no" >&6; }
     7857fi
     7858
     7859
     7860    test -n "$AR" && break
     7861  done
     7862fi
     7863if test -z "$AR"; then
     7864  ac_ct_AR=$AR
     7865  for ac_prog in ar lib "link -lib"
     7866do
     7867  # Extract the first word of "$ac_prog", so it can be a program name with args.
     7868set dummy $ac_prog; ac_word=$2
     7869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
     7870$as_echo_n "checking for $ac_word... " >&6; }
     7871if ${ac_cv_prog_ac_ct_AR+:} false; then :
     7872  $as_echo_n "(cached) " >&6
     7873else
     7874  if test -n "$ac_ct_AR"; then
     7875  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
     7876else
     7877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     7878for as_dir in $PATH
     7879do
     7880  IFS=$as_save_IFS
     7881  test -z "$as_dir" && as_dir=.
     7882    for ac_exec_ext in '' $ac_executable_extensions; do
     7883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     7884    ac_cv_prog_ac_ct_AR="$ac_prog"
     7885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     7886    break 2
     7887  fi
     7888done
     7889  done
     7890IFS=$as_save_IFS
     7891
     7892fi
     7893fi
     7894ac_ct_AR=$ac_cv_prog_ac_ct_AR
     7895if test -n "$ac_ct_AR"; then
     7896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
     7897$as_echo "$ac_ct_AR" >&6; }
     7898else
     7899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
     7900$as_echo "no" >&6; }
     7901fi
     7902
     7903
     7904  test -n "$ac_ct_AR" && break
     7905done
     7906
     7907  if test "x$ac_ct_AR" = x; then
     7908    AR="false"
     7909  else
     7910    case $cross_compiling:$ac_tool_warned in
     7911yes:)
     7912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
     7913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
     7914ac_tool_warned=yes ;;
     7915esac
     7916    AR=$ac_ct_AR
     7917  fi
     7918fi
     7919
     7920: ${AR=ar}
     7921
     7922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
     7923$as_echo_n "checking the archiver ($AR) interface... " >&6; }
     7924if ${am_cv_ar_interface+:} false; then :
     7925  $as_echo_n "(cached) " >&6
     7926else
     7927  ac_ext=c
     7928ac_cpp='$CPP $CPPFLAGS'
     7929ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     7930ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     7931ac_compiler_gnu=$ac_cv_c_compiler_gnu
     7932
     7933   am_cv_ar_interface=ar
     7934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     7935/* end confdefs.h.  */
     7936int some_variable = 0;
     7937_ACEOF
     7938if ac_fn_c_try_compile "$LINENO"; then :
     7939  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
     7940      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
     7941  (eval $am_ar_try) 2>&5
     7942  ac_status=$?
     7943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7944  test $ac_status = 0; }
     7945      if test "$ac_status" -eq 0; then
     7946        am_cv_ar_interface=ar
     7947      else
     7948        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
     7949        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
     7950  (eval $am_ar_try) 2>&5
     7951  ac_status=$?
     7952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     7953  test $ac_status = 0; }
     7954        if test "$ac_status" -eq 0; then
     7955          am_cv_ar_interface=lib
     7956        else
     7957          am_cv_ar_interface=unknown
     7958        fi
     7959      fi
     7960      rm -f conftest.lib libconftest.a
     7961
     7962fi
     7963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     7964   ac_ext=c
     7965ac_cpp='$CPP $CPPFLAGS'
     7966ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     7967ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     7968ac_compiler_gnu=$ac_cv_c_compiler_gnu
     7969
     7970fi
     7971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
     7972$as_echo "$am_cv_ar_interface" >&6; }
     7973
     7974case $am_cv_ar_interface in
     7975ar)
     7976  ;;
     7977lib)
     7978  # Microsoft lib, so override with the ar-lib wrapper script.
     7979  # FIXME: It is wrong to rewrite AR.
     7980  # But if we don't then we get into trouble of one sort or another.
     7981  # A longer-term fix would be to have automake use am__AR in this case,
     7982  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
     7983  # similar.
     7984  AR="$am_aux_dir/ar-lib $AR"
     7985  ;;
     7986unknown)
     7987  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
     7988  ;;
     7989esac
     7990
     7991
    78227992# Create libtool.
    7823 
    78247993
    78257994
     
    1241712586# Patch libtool to circumvent some issues when using MSVC and MS lib.
    1241812587# This needs to be run after config.status has created libtool.
    12419 # 1. Eliminate a trailing space after AR_FLAGS. Apparently necessary on
    12420 #    Windows when AR=lib.exe.
    12421 # 2. Patch libtool's func_extract_an_archive in case of $AR=lib. The current
    12422 #    libtool implementation assumes that it can do $AR x to extract an archive.
    12423 #    We replace this two-liner in func_extract_an_archive by replacing the first
    12424 #    line by something clunky that works with lib and making sure that the following
    12425 #    line is ignored (by finishing with ": \"). We completely disregard running the
    12426 #    command through func_show_eval and do not stop if it fails.
    12427 # 3. Relax check which libraries can be used when linking a DLL.
     12588# 1. Relax check which libraries can be used when linking a DLL.
    1242812589#    libtool's func_mode_link() would reject linking a .lib file when building a DLL,
    1242912590#    even though this .lib file may just be the one that eventually loads a depending DLL,
    1243012591#    e.g., mkl_core_dll.lib. Setting deplibs_check_method=pass_all will still print a
    1243112592#    warning, but the .lib is still passed to the linker.
    12432 # 4. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
     12593# 2. Ensure always_export_symbols=no if win32-dll. Even when we pass win32-dll,
    1243312594#    libtool forces always_export_symbols=yes for --tag=CXX if using MS compiler.
    1243412595#    This leads to a nm call that collects ALL C-functions from a library
    1243512596#    and explicitly dll-exporting them, leading to warnings about duplicates
    1243612597#    regarding those that are properly marked for dll-export in the source.
    12437 # 5. Do not add mkl_*.lib to old_deplibs, which can result in trying to unpack and repack
     12598# 3. Do not add mkl_*.lib to old_deplibs, which can result in trying to unpack and repack
    1243812599#    the MKL libraries (which are pretty big). Instead, treat them like other -l<...> libs.
    12439 # 6. Add MKL libraries to dependency_libs in .la file, which I guess should be
     12600# 4. Add MKL libraries to dependency_libs in .la file, which I guess should be
    1244012601#    the case due to point 5.
    1244112602#
     
    1244812609#    this faulty check.
    1244912610
    12450   case "$AR" in
    12451     *lib* | *LIB* )
     12611  case "$am_cv_ar_interface" in
     12612    lib )
    1245212613      ac_config_commands="$ac_config_commands libtoolclpatch"
    1245312614
     
    1503715198
    1503815199 ;;
    15039     "libtoolclpatch":C) sed -e 's|AR_FLAGS |AR_FLAGS|g' \
    15040              -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' \
    15041              -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
     15200    "libtoolclpatch":C) sed -e '/^deplibs_check_method/s/.*/deplibs_check_method="pass_all"/g' \
    1504215201             -e 's|always_export_symbols=yes|always_export_symbols=no|g' \
    1504315202             -e '/func_append old_deplibs/s/\(.*\)/case $arg in *mkl_*.lib) ;; *) \1 ;; esac/g' \
Note: See TracChangeset for help on using the changeset viewer.