Changeset 165


Ignore:
Timestamp:
Dec 9, 2006 1:15:08 AM (13 years ago)
Author:
andreasw
Message:
  • allow to use libtool script from package's base directory (skip a number of tests if it is found)
  • added some caching
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r159 r165  
    485485            *-cygwin*)
    486486              CXXFLAGS="-mno-cygwin"
    487               AC_TRY_LINK([],[int i=0; i++;],
     487              AC_TRY_LINK(,[int i=0; i++;],
    488488                          [coin_add_cxxflags="-mno-cygwin $coin_add_cxxflags"])
    489489              CXXFLAGS=
     
    513513            # Check if -i_dynamic is necessary (for new glibc library)
    514514            CXXFLAGS=
    515             AC_TRY_LINK([],[int i=0; i++;],[],
     515            AC_TRY_LINK(,[int i=0; i++;],[],
    516516                        [coin_add_cxxflags="-i_dynamic $coin_add_cxxflags"])
    517517            ;;
     
    10011001        *-cygwin*)
    10021002          FFLAGS="-mno-cygwin"
    1003           AC_TRY_LINK([],[      write(*,*) 'Hello world'],
     1003          AC_TRY_LINK(,[      write(*,*) 'Hello world'],
    10041004                      [coin_add_fflags="-mno-cygwin $coin_add_fflags"])
    10051005          FFLAGS=
     
    10261026            # Check if -i_dynamic is necessary (for new glibc library)
    10271027            FFLAGS=
    1028             AC_TRY_LINK([],[      write(*,*) 'Hello world'],[],
     1028            AC_TRY_LINK(,[      write(*,*) 'Hello world'],[],
    10291029                        [coin_add_fflags="-i_dynamic $coin_add_fflags"])
    10301030            ;;
     
    10681068    # Try if -O option works if nothing else is set
    10691069    FFLAGS=-O
    1070     AC_TRY_LINK([],[      integer i], [coin_opt_fflags="-O"])
     1070    AC_TRY_LINK(,[      integer i], [coin_opt_fflags="-O"])
    10711071  fi
    10721072
     
    11021102
    11031103# Try if FFLAGS works
    1104 AC_TRY_LINK([],[      integer i],[],[FFLAGS=])
     1104AC_TRY_LINK(,[      integer i],[],[FFLAGS=])
    11051105if test -z "$FFLAGS"; then
    11061106  AC_MSG_WARN([The flags FFLAGS="$FFLAGS" do not work.  I will now just try '-O', but you might want to set FFLAGS manually.])
    11071107  FFLAGS='-O'
    1108   AC_TRY_LINK([],[      integer i],[],[FFLAGS=])
     1108  AC_TRY_LINK(,[      integer i],[],[FFLAGS=])
    11091109  if test -z "$FFLAGS"; then
    11101110    AC_MSG_WARN([This value for FFLAGS does not work.  I will continue with empty FFLAGS, but you might want to set FFLAGS manually.])
     
    12381238  AUTOTOOLS_DFLT=$HOME
    12391239
    1240   # Check if we have autoconf
    1241   AC_CHECK_PROG([have_autoconf],[autoconf],[yes],[no])
    1242   if test $have_autoconf = no; then
    1243     AC_MSG_ERROR([You specified you want to use maintainer mode, but I cannot find autoconf in your path.])
    1244   fi
    1245 
    1246   # Check whether autoconf is the correct version
    1247   correct_version='2.59'
    1248   grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
    1249   AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of autoconf])
    1250   autoconf --version > confauto.out 2>&1
    1251   if $EGREP $grep_version confauto.out >/dev/null 2>&1; then
    1252     AC_MSG_RESULT([yes])
    1253   else
     1240  AC_CACHE_CHECK([whether we are using the correct autotools],
     1241                 [ac_cv_use_correct_autotools],
     1242                 [ac_cv_use_correct_autotools=check])
     1243
     1244  if test $ac_cv_use_correct_autotools = check; then
     1245    ac_cv_use_correct_autotools=yes
     1246    # Check if we have autoconf
     1247    AC_CHECK_PROG([have_autoconf],[autoconf],[yes],[no])
     1248    if test $have_autoconf = no; then
     1249      AC_MSG_ERROR([You specified you want to use maintainer mode, but I cannot find autoconf in your path.])
     1250    fi
     1251
     1252    # Check whether autoconf is the correct version
     1253    correct_version='2.59'
     1254    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
     1255    AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of autoconf])
     1256    autoconf --version > confauto.out 2>&1
     1257    if $EGREP $grep_version confauto.out >/dev/null 2>&1; then
     1258      AC_MSG_RESULT([yes])
     1259    else
     1260      rm -f confauto.out
     1261      AC_MSG_RESULT([no])
     1262      AC_MSG_ERROR([You don't have the correct version of autoconf as the first one in your path.])
     1263    fi
    12541264    rm -f confauto.out
    1255     AC_MSG_RESULT([no])
    1256     AC_MSG_ERROR([You don't have the correct version of autoconf as the first one in your path.])
    1257   fi
    1258   rm -f confauto.out
    1259 
    1260   # Check if the executable autoconf is picked up from the correct location
    1261   AC_MSG_CHECKING([whether autoconf is coming from the correct location])
    1262   autoconf_dir=`which autoconf | sed -e 's=/autoconf=='`
    1263   autoconf_dir=`cd $autoconf_dir; pwd`
    1264   if test x$AUTOTOOLS_DIR = x; then
    1265     want_dir=$AUTOTOOLS_DFLT/bin
    1266   else
    1267     want_dir=$AUTOTOOLS_DIR/bin
    1268   fi
    1269   if test $autoconf_dir = `cd $want_dir; pwd`; then
    1270     AC_MSG_RESULT([yes])
    1271   else
     1265
     1266    # Check if the executable autoconf is picked up from the correct location
     1267    AC_MSG_CHECKING([whether autoconf is coming from the correct location])
     1268    autoconf_dir=`which autoconf | sed -e 's=/autoconf=='`
     1269    autoconf_dir=`cd $autoconf_dir; pwd`
     1270    if test x$AUTOTOOLS_DIR = x; then
     1271      want_dir=$AUTOTOOLS_DFLT/bin
     1272    else
     1273      want_dir=$AUTOTOOLS_DIR/bin
     1274    fi
     1275    if test $autoconf_dir = `cd $want_dir; pwd`; then
     1276      AC_MSG_RESULT([yes])
     1277    else
     1278      rm -f confauto.out
     1279      AC_MSG_RESULT([no])
     1280      AC_MSG_ERROR([The autoconf executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin.])
     1281    fi
     1282
     1283    # Check if we have automake
     1284    AC_CHECK_PROG([have_automake],[automake],[yes],[no])
     1285    if test $have_automake = no; then
     1286      AC_MSG_ERROR([You specified you want to use maintainer mode, but I cannot find automake in your path.])
     1287    fi
     1288 
     1289    # Check whether automake is the correct version
     1290    correct_version='1.9.6'
     1291    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
     1292    AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of automake])
     1293    automake --version > confauto.out 2>&1
     1294    if $EGREP $grep_version confauto.out >/dev/null 2>&1; then
     1295      AC_MSG_RESULT([yes])
     1296    else
     1297      rm -f confauto.out
     1298      AC_MSG_RESULT([no])
     1299      AC_MSG_ERROR([You don't have the correct version of automake as the first one in your path.])
     1300    fi
    12721301    rm -f confauto.out
    1273     AC_MSG_RESULT([no])
    1274     AC_MSG_ERROR([The autoconf executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin.])
    1275   fi
    1276 
    1277   # Check if we have automake
    1278   AC_CHECK_PROG([have_automake],[automake],[yes],[no])
    1279   if test $have_automake = no; then
    1280     AC_MSG_ERROR([You specified you want to use maintainer mode, but I cannot find automake in your path.])
    1281   fi
    1282  
    1283   # Check whether automake is the correct version
    1284   correct_version='1.9.6'
    1285   grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
    1286   AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of automake])
    1287   automake --version > confauto.out 2>&1
    1288   if $EGREP $grep_version confauto.out >/dev/null 2>&1; then
    1289     AC_MSG_RESULT([yes])
    1290   else
    1291     rm -f confauto.out
    1292     AC_MSG_RESULT([no])
    1293     AC_MSG_ERROR([You don't have the correct version of automake as the first one in your path.])
    1294   fi
    1295   rm -f confauto.out
    1296 
    1297   # Check if the executable automake is picked up from the correct location
    1298   AC_MSG_CHECKING([whether automake is coming from the correct location])
    1299   automake_dir=`which automake | sed -e 's=/automake=='`
    1300   automake_dir=`cd $automake_dir; pwd`
    1301   if test x$AUTOTOOLS_DIR = x; then
    1302     want_dir=$AUTOTOOLS_DFLT/bin
    1303   else
    1304     want_dir=$AUTOTOOLS_DIR/bin
    1305   fi
    1306   if test $automake_dir = `cd $want_dir; pwd`; then
    1307     AC_MSG_RESULT([yes])
    1308   else
    1309     rm -f confauto.out
    1310     AC_MSG_RESULT([no])
    1311     AC_MSG_ERROR([The automake executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin.])
     1302
     1303    # Check if the executable automake is picked up from the correct location
     1304    AC_MSG_CHECKING([whether automake is coming from the correct location])
     1305    automake_dir=`which automake | sed -e 's=/automake=='`
     1306    automake_dir=`cd $automake_dir; pwd`
     1307    if test x$AUTOTOOLS_DIR = x; then
     1308      want_dir=$AUTOTOOLS_DFLT/bin
     1309    else
     1310      want_dir=$AUTOTOOLS_DIR/bin
     1311    fi
     1312    if test $automake_dir = `cd $want_dir; pwd`; then
     1313      AC_MSG_RESULT([yes])
     1314    else
     1315      rm -f confauto.out
     1316      AC_MSG_RESULT([no])
     1317      AC_MSG_ERROR([The automake executable should be picked up from \$AUTOTOOLS_DFLT/bin or \$AUTOTOOLS_DIR/bin.])
     1318    fi
     1319
     1320    # Check if this is the correct version of libtool (with escaped dots)
     1321    if test x$AUTOTOOLS_DIR = x; then
     1322      want_dir=$AUTOTOOLS_DFLT/share
     1323    else
     1324      want_dir=$AUTOTOOLS_DIR/share
     1325    fi
     1326    correct_version='1.5.22'
     1327    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
     1328    AC_CHECK_FILE([$want_dir/libtool/ltmain.sh],
     1329                  [have_ltmain=yes],
     1330                  [have_ltmain=no])
     1331    AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of libtool.])
     1332    if test $have_ltmain = yes; then
     1333    if $EGREP $grep_version $want_dir/libtool/ltmain.sh >/dev/null 2>&1; then
     1334        AC_MSG_RESULT([yes])
     1335      else
     1336        AC_MSG_RESULT([no])
     1337        AC_MSG_ERROR([You don't have the correct version of libtool.])
     1338      fi
     1339    else
     1340      AC_MSG_RESULT([no])
     1341      AC_MSG_ERROR([I cannot find the ltmain.sh file.])
     1342    fi
    13121343  fi
    13131344
     
    13221353                [AC_MSG_ERROR([I cannot find the libtool.m4 file.])])
    13231354
    1324   # Check if this is the correct version of libtool (with escaped dots)
    1325   correct_version='1.5.22'
    1326   grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
    1327   AC_CHECK_FILE([$want_dir/libtool/ltmain.sh],
    1328                 [have_ltmain=yes],
    1329                 [have_ltmain=no])
    1330   AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of libtool.])
    1331   if test $have_ltmain = yes; then
    1332     if $EGREP $grep_version $want_dir/libtool/ltmain.sh >/dev/null 2>&1; then
    1333       AC_MSG_RESULT([yes])
    1334     else
    1335       AC_MSG_RESULT([no])
    1336       AC_MSG_ERROR([You don't have the correct version of libtool.])
    1337     fi
    1338   else
    1339     AC_MSG_RESULT([no])
    1340     AC_MSG_ERROR([I cannot find the ltmain.sh file.])
    1341   fi 
    1342 
    13431355  # Check if we have an Externals file
    13441356  if test -r $srcdir/Externals; then
     
    13481360  AC_CHECK_PROG([have_svn],[svn],[yes],[no])
    13491361  if test x$have_svn = xyes; then
    1350     AC_MSG_CHECKING([svn understands https])
    1351     svn --version > confauto.out 2>&1
    1352     if $EGREP https confauto.out >/dev/null 2>&1; then
    1353       AC_MSG_RESULT(yes)
    1354     else
    1355       AC_MSG_RESULT(no)
    1356       have_svn=no
    1357     fi
    1358     rm -f confauto.out
     1362    AC_CACHE_CHECK([whether svn understands https],
     1363                   [ac_cv_svn_understands_https],
     1364                   [svn --version > confauto.out 2>&1
     1365                    if $EGREP https confauto.out >/dev/null 2>&1; then
     1366                      ac_cv_svn_understands_https=yes
     1367                    else
     1368                      ac_cv_svn_understands_https=no
     1369                      have_svn=no
     1370                      ac_cv_prog_have_svn=no
     1371                    fi
     1372                    rm -f confauto.out])
    13591373  fi
    13601374
     
    14031417               test $coin_have_externals = yes && test x$have_svn = xyes)
    14041418]) # AC_COIN_INIT_AUTOMAKE
     1419
     1420###########################################################################
     1421#                          COIN_CREATE_LIBTOOL                            #
     1422###########################################################################
     1423
     1424# This does all the tests necessary to create the libtool script in the
     1425# package base directory.  If this is used, then the COIN_INIT_AUTO_TOOLS
     1426# test in the subdirectories will be able to skip the libtool tests and
     1427# just use the one in the package base directory.
     1428
     1429m4_define([AC_COIN_CREATE_LIBTOOL],
     1430[# Check if user wants to produce debugging code
     1431AC_COIN_DEBUG_COMPILE
     1432
     1433# Get the name of the C compiler and appropriate compiler options
     1434AC_COIN_PROG_CC
     1435
     1436# Get the name of the C++ compiler and appropriate compiler options
     1437AC_COIN_PROG_CXX
     1438
     1439# Get the name of the Fortran compiler and appropriate compiler options
     1440AC_COIN_PROG_F77
     1441
     1442# Initialize automake and libtool
     1443AC_COIN_INIT_AUTO_TOOLS
     1444])
    14051445
    14061446###########################################################################
     
    14431483])
    14441484
    1445 AC_DEFUN([AC_COIN_INIT_AUTO_TOOLS],
    1446 [AC_BEFORE([AC_COIN_PROG_CXX],[$0])
     1485m4_define([AC_COIN_INIT_AUTO_TOOLS],
     1486[{AC_BEFORE([AC_COIN_PROG_CXX],[$0])
    14471487AC_BEFORE([AC_COIN_PROG_CC],[$0])
    14481488AC_BEFORE([AC_COIN_PROG_F77],[$0])
    1449 AC_REQUIRE([AC_COIN_DISABLE_STATIC])
     1489
     1490# START
     1491AC_COIN_DISABLE_STATIC
    14501492
    14511493# Initialize automake
    14521494AC_COIN_INIT_AUTOMAKE
    14531495
    1454 # Stuff for libtool
    1455 AC_COIN_PROG_LIBTOOL
     1496unset ac_cv_file__________libtool
     1497unset ac_cv_file_______libtool
     1498unset ac_cv_file____libtool
     1499
     1500LIBTOOL=
     1501AC_CHECK_FILE([../libtool],
     1502              [coin_config_dir=..
     1503               LIBTOOL='$(SHELL) $(top_builddir)/../libtool'])
     1504if test "x$LIBTOOL" = x; then
     1505  AC_CHECK_FILE([../../libtool],
     1506                [coin_config_dir=../..
     1507                 LIBTOOL='$(SHELL) $(top_builddir)/../../libtool'])
     1508fi
     1509if test "x$LIBTOOL" = x; then
     1510  AC_CHECK_FILE([../../../libtool],
     1511                [coin_config_dir=../../..
     1512                 LIBTOOL='$(SHELL) $(top_builddir)/../../../libtool'])
     1513fi
     1514
     1515if test "x$LIBTOOL" = x; then
     1516
     1517  # Stuff for libtool
     1518  AC_COIN_PROG_LIBTOOL
     1519
     1520else
     1521
     1522  AC_MSG_NOTICE([Using libtool script in directory $coin_config_dir])
     1523  # get all missing information from the config.log file
     1524
     1525  # output variables and defines
     1526  as_save_IFS=$IFS
     1527  IFS='
     1528'
     1529  for oneline in `cat $coin_config_dir/config.status`; do
     1530    case "$oneline" in
     1531         # First some automake conditionals
     1532      s,@am__fastdep* | s,@AR@* | s,@CPP@*  | s,@CPPFLAGS@* | s,@CXXCPP@*  | \
     1533      s,@RANLIB@* | s,@STRIP@* | s,@ac_ct_AR@* | s,@ac_ct_RANLIB@* | \
     1534      s,@ac_ct_STRIP@* | s,@host* | s,@LN_S@* )
     1535        command=`echo $oneline | sed -e 's/^s,@//' -e 's/@,/="/' -e 's/,;t t/"/'`
     1536#        echo "$command"
     1537        eval "$command"
     1538        ;;
     1539      s,@DEFS@* )
     1540        command=`echo $oneline | sed -e 's/^s,@DEFS@,/defsline="/' -e 's/,;t t/"/'`
     1541#        echo "$command"
     1542        eval "$command"
     1543        ;;
     1544    esac
     1545  done
     1546  IFS=$as_save_IFS
     1547
     1548  # And some defines (assuming here that the packages base dir
     1549  # doesn't have a config.h file
     1550  for word in $defsline; do
     1551#    echo word $word
     1552    case $word in
     1553      -DHAVE_@<:@A-Z_@:>@*_H=1 | -DSTDC_HEADERS=1 )
     1554        i=`echo $word | sed -e 's/-D/#define /' -e 's/=/ /'`
     1555#        echo dd $i
     1556        echo $i >>confdefs.h
     1557        ;;
     1558    esac
     1559  done
     1560fi
     1561
     1562# ToDo
     1563# For now, don't use the -no-undefined flag, since the Makefiles are
     1564# not yet set up that way.  But we need to fix this, when we want
     1565# to comile DLLs under Windows.
     1566LT_LDFLAGS=
     1567AC_SUBST(LT_LDFLAGS)
    14561568
    14571569# set RPATH_FLAGS to the compiler link flags required to hardcode location
    14581570# of the shared objects
    14591571AC_COIN_RPATH_FLAGS($abs_lib_dir)
    1460 ]) # AC_COIN_INIT_AUTO_TOOLS
     1572
     1573
     1574#END
     1575}])
     1576
    14611577
    14621578###########################################################################
     
    14671583# work on additional platforms
    14681584
     1585AC_DEFUN([AC_COIN_LIBTOOL_WRAPPER],
     1586[AC_BEFORE([AC_COIN_BLA],[$0])
     1587AC_PROG_LIBTOOL])
     1588
     1589AC_DEFUN([AC_COIN_BLA],[echo bla])
     1590
    14691591AC_DEFUN([AC_COIN_PROG_LIBTOOL],
    14701592[AC_REQUIRE([AC_COIN_DLFCN_H])
    14711593
    1472 # We check for this header here in a non-standard way to avoid warning
    1473 # messages
    1474 AC_PROG_LIBTOOL
     1594# NEW: If libtool exists in the directory higher up, we use that one
     1595#      instead of creating a new one
     1596
     1597if test "x$LIBTOOL" = x; then
     1598  # We check for this header here in a non-standard way to avoid warning
     1599  # messages
     1600  AC_PROG_LIBTOOL
    14751601
    14761602# Fix bugs in libtool script for Windows native compilation:
     
    14921618#          -e 'sYcompile_command=`\$echo "X\$compile_command" | \$Xsed -e '"'"'s%@OUTPUT@%'"'"'"\$output"'"'"'%g'"'"'`Ycompile_command=`\$echo "X\$compile_command" | \$Xsed -e '"'"'s%@OUTPUT@%'"'"'"\$output"'"'"'%g'"'"' | \$Xsed -e '"'"'s%@BACKSLASH@%\\\\\\\\\\\\\\\\%g'"'"'`Y' \
    14931619
    1494 # Correct cygpath for minGW (ToDo!)
    1495 case $build in
    1496   *-mingw*)
    1497     CYGPATH_W=echo
    1498     ;;
    1499 esac
    1500 
    1501 case $build in
    1502   *-cygwin* | *-mingw*)
    1503   case "$CXX" in
    1504     cl* | */cl*)
    1505       AC_MSG_NOTICE(Applying patches to libtool for cl compiler)
    1506       sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
    1507           -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
    1508           -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
    1509           -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
    1510           -e 's%lib /OUT:%lib -OUT:%' \
    1511           -e "s%cygpath -w%$CYGPATH_W%" \
    1512           -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
    1513           -e 's/$AR t/lib -nologo -list/' \
    1514           -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
    1515           -e  's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
    1516       libtool > conftest.bla
    1517 
    1518       mv conftest.bla libtool
    1519       chmod 755 libtool
    1520       ;;
    1521     *)
    1522       AC_MSG_NOTICE(Applying patches to libtool for GNU compiler)
    1523       sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
    1524           -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
    1525           -e 's|libext="lib"|libext="a"|' \
    1526       libtool > conftest.bla
    1527 
    1528       mv conftest.bla libtool
    1529       chmod 755 libtool
     1620  # Correct cygpath for minGW (ToDo!)
     1621  case $build in
     1622    *-mingw*)
     1623      CYGPATH_W=echo
    15301624      ;;
    15311625  esac
    1532 esac
    1533 
    1534 # ToDo
    1535 # For now, don't use the -no-undefined flag, since the Makefiles are
    1536 # not yet set up that way.  But we need to fix this, when we want
    1537 # to comile DLLs under Windows.
    1538 LT_LDFLAGS=
    1539 AC_SUBST(LT_LDFLAGS)
     1626
     1627  case $build in
     1628    *-cygwin* | *-mingw*)
     1629    case "$CXX" in
     1630      cl* | */cl*)
     1631        AC_MSG_NOTICE(Applying patches to libtool for cl compiler)
     1632        sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     1633            -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     1634            -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
     1635            -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
     1636            -e 's%lib /OUT:%lib -OUT:%' \
     1637            -e "s%cygpath -w%$CYGPATH_W%" \
     1638            -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
     1639            -e 's/$AR t/lib -nologo -list/' \
     1640            -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
     1641            -e  's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
     1642        libtool > conftest.bla
     1643
     1644        mv conftest.bla libtool
     1645        chmod 755 libtool
     1646        ;;
     1647      *)
     1648        AC_MSG_NOTICE(Applying patches to libtool for GNU compiler)
     1649        sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     1650            -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
     1651            -e 's|libext="lib"|libext="a"|' \
     1652        libtool > conftest.bla
     1653
     1654        mv conftest.bla libtool
     1655        chmod 755 libtool
     1656        ;;
     1657    esac
     1658  esac
     1659fi
     1660
    15401661]) # AC_COIN_PROG_LIBTOOL
    15411662
     
    21272248[case $ac_ext in
    21282249  f)
    2129     AC_TRY_LINK([],[      call $1],[$2],[$3])
     2250    AC_TRY_LINK(,[      call $1],[$2],[$3])
    21302251    ;;
    21312252  c)
Note: See TracChangeset for help on using the changeset viewer.