Changeset 2139


Ignore:
Timestamp:
Mar 26, 2011 2:37:15 PM (9 years ago)
Author:
stefan
Message:

make sure FLIBS are determined and corrected before other macros (required by AC_F77_WRAPPERS) uses them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r2136 r2139  
    11771177###########################################################################
    11781178
    1179 # Calls autoconfs AC_F77_WRAPPERS and does additional corrections to FLIBS
    1180 
    1181 AC_DEFUN([AC_COIN_F77_WRAPPERS],
    1182 [AC_BEFORE([AC_COIN_PROG_F77],[$0])dnl
    1183 AC_BEFORE([AC_PROG_F77],[$0])dnl
    1184 
    1185 AC_LANG_PUSH([Fortran 77])
    1186 
    1187 AC_F77_WRAPPERS
     1179# Calls autoconfs AC_F77_LIBRARY_LDFLAGS and does additional corrections to FLIBS.
     1180# Then calls AC_F77_WRAPPERS to get Fortran namemangling scheme.
     1181#
     1182# To ensure that the FLIBS are determined and corrected before linking against
     1183# Fortran compilers is attempted by other macros, we put it into an extra macro
     1184# and call it via AC_REQUIRE. This way it seems to be called before the macros
     1185# required by AC_F77_WRAPPERS.
     1186
     1187AC_DEFUN([_AC_COIN_F77_LIBRARY_LDFLAGS],
     1188[AC_BEFORE([AC_PROG_F77],[$0])dnl
     1189
     1190# get FLIBS
     1191AC_F77_LIBRARY_LDFLAGS
     1192orig_FLIBS="$FLIBS"
    11881193
    11891194# If FLIBS has been set by the user, we just restore its value here
     
    12011206      esac
    12021207    done
    1203     if test "x$FLIBS" != "x$my_flibs" ; then
    1204       AC_MSG_NOTICE(["corrected FLIBS: $my_flibs"])
    1205     fi
    12061208    FLIBS="$my_flibs"
    12071209  fi
     
    12421244fi
    12431245
     1246if test "x$orig_FLIBS" != "x$FLIBS" ; then
     1247  AC_MSG_NOTICE([Corrected Fortran libraries: $FLIBS])
     1248fi
     1249]) # _AC_COIN_F77_LIBRARY_LDFLAGS
     1250
     1251AC_DEFUN([AC_COIN_F77_WRAPPERS],
     1252[AC_BEFORE([AC_COIN_PROG_F77],[$0])dnl
     1253AC_REQUIRE([_AC_COIN_F77_LIBRARY_LDFLAGS])dnl
     1254
     1255AC_LANG_PUSH([Fortran 77])
     1256AC_F77_WRAPPERS
    12441257AC_LANG_POP([Fortran 77])
    12451258
Note: See TracChangeset for help on using the changeset viewer.