Mercurial > hg > octave-lyh
comparison configure.ac @ 13024:f3c53fea9fb5
maint: more linking tweaks
* configure.ac (--enable-link-all-dependencies): New option.
(--enable-no-undefined): New option.
Don't set NO_UNDEFINED_LDFLAG specially on Windows systems.
* liboctave/link-deps.mk (LIBOCTAVE_LINK_DEPS):
Include $(LAPACK_LIBS), $(BLAS_LIBS) and $(LIBS) in the list.
* config-modules.awk: Add $(NO_UNDEFINED_LDFLAG) to LDFLAGS variables.
* src/link-deps.mk (OCT_LINK_DEPS): Remove $(NO_UNDEFINED_LDFLAG from
the list.
* src/mkoctfile.cc.in, mkoctfile.in:
Always link files with -loctinterp, -loctave, and -lcruft.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 29 Aug 2011 11:49:30 -0400 |
parents | 6b0798860fa4 |
children | f26ea04b5356 8a688c3179dd |
comparison
equal
deleted
inserted
replaced
13023:7d1e11d922aa | 13024:f3c53fea9fb5 |
---|---|
1456 | 1456 |
1457 ### special checks for odd OS specific things. | 1457 ### special checks for odd OS specific things. |
1458 | 1458 |
1459 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) | 1459 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)]) |
1460 | 1460 |
1461 NO_UNDEFINED_LDFLAG= | |
1462 case "$canonical_host_type" in | 1461 case "$canonical_host_type" in |
1463 *-*-mingw*) | 1462 *-*-mingw*) |
1464 if test "$have_msvc" = "yes"; then | 1463 if test "$have_msvc" = "yes"; then |
1465 AC_CHECK_LIB(dirent, opendir) | 1464 AC_CHECK_LIB(dirent, opendir) |
1466 LIBS="$LIBS -ladvapi32 -lgdi32 -lws2_32 -luser32 -lkernel32" | 1465 LIBS="$LIBS -ladvapi32 -lgdi32 -lws2_32 -luser32 -lkernel32" |
1467 NO_UNDEFINED_LDFLAG=-no-undefined | |
1468 else | 1466 else |
1469 LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32" | 1467 LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32" |
1470 NO_UNDEFINED_LDFLAG=-no-undefined | |
1471 fi | 1468 fi |
1472 LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32" | 1469 LIBS="$LIBS -lgdi32 -lws2_32 -luser32 -lkernel32" |
1473 NO_UNDEFINED_LDFLAG=-no-undefined | |
1474 ;; | 1470 ;; |
1475 *-*-msdosmsvc*) | 1471 *-*-msdosmsvc*) |
1476 AC_CHECK_LIB(dirent, opendir) | 1472 AC_CHECK_LIB(dirent, opendir) |
1477 LIBS="$LIBS -ladvapi32 -lgdi32 -lws2_32 -luser32 -lkernel32" | 1473 LIBS="$LIBS -ladvapi32 -lgdi32 -lws2_32 -luser32 -lkernel32" |
1478 NO_UNDEFINED_LDFLAG=-no-undefined | |
1479 ;; | 1474 ;; |
1480 esac | 1475 esac |
1476 | |
1477 AC_ARG_ENABLE([no-undefined], | |
1478 [AS_HELP_STRING([--enable-no-undefined], | |
1479 [pass -no-undefined to libtool when linking linking Octave and its shared libraries (on by default)])], | |
1480 [case "${enableval}" in | |
1481 yes) NO_UNDEFINED_LDFLAG="-no-undefined" ;; | |
1482 no) NO_UNDEFINED_LDFLAG="" ;; | |
1483 *) AC_MSG_ERROR([bad value ${enableval} for --enable-link-all-depenencies]) ;; | |
1484 esac], [NO_UNDEFINED_LDFLAG="-no-undefined"]) | |
1481 AC_SUBST(NO_UNDEFINED_LDFLAG) | 1485 AC_SUBST(NO_UNDEFINED_LDFLAG) |
1482 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test -n "$NO_UNDEFINED_LDFLAG"]) | 1486 |
1487 AC_ARG_ENABLE([link-all-dependencies], | |
1488 [AS_HELP_STRING([--enable-link-all-dependencies], | |
1489 [link Octave and its shared libraries with all dependencies, not just those immediately referenced (should not be needed on most systems)])], | |
1490 [case "${enableval}" in | |
1491 yes) link_all_deps=true ;; | |
1492 no) link_all_deps=false ;; | |
1493 *) AC_MSG_ERROR([bad value ${enableval} for --enable-link-all-depenencies]) ;; | |
1494 esac], [link_all_deps=false]) | |
1495 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test x$link_all_deps = xtrue]) | |
1483 | 1496 |
1484 ### Type stuff. | 1497 ### Type stuff. |
1485 | 1498 |
1486 AC_TYPE_MODE_T | 1499 AC_TYPE_MODE_T |
1487 AC_TYPE_OFF_T | 1500 AC_TYPE_OFF_T |