Skip to content
Browse files

Turn on -no-undefined to detect boost properly and -as-needed to redu…

…ce linkage. gsl thinks it's special (libgsl.so has undefined symbols. not cool in a shared library!) so wrap it in a shield. If this causes linker failures anywhere, this also shows how to fix it. Also, make qwt be auto-detectable in places where the qt version is appended.
  • Loading branch information...
1 parent 385d310 commit 7f46f218cfda6b222a26d8feafe45652bdb4016a @novas0x2a novas0x2a committed Nov 26, 2008
Showing with 12 additions and 4 deletions.
  1. +1 −1 config.options.irg
  2. +11 −3 configure.ac
View
2 config.options.irg
@@ -39,7 +39,7 @@ HAVE_PKG_QT_CORE=$IRGPKG_DIR/qt-4
HAVE_PKG_QT_GUI=$IRGPKG_DIR/qt-4
HAVE_PKG_QT_INCLUDE=$IRGPKG_DIR/qt-4
HAVE_PKG_QT_SQL=$IRGPKG_DIR/qt-4
-HAVE_PKG_QWT=$IRGPKG_DIR/qwt
+HAVE_PKG_QWT_PLAIN=$IRGPKG_DIR/qwt
HAVE_PKG_SPICE=$IRGPKG_DIR/cspice
HAVE_PKG_SUPERLU=$IRGPKG_DIR/superlu
HAVE_PKG_VW_CAMERA=$VW_INSTALL
View
14 configure.ac
@@ -125,6 +125,7 @@ fi
CFLAGS="$CFLAGS -I\${top_srcdir}/src $AX_CFLAGS"
CXXFLAGS="$CXXFLAGS -I\${top_srcdir}/src $AX_CFLAGS"
+LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,-as-needed"
AC_ARG_ENABLE(exceptions,
@@ -300,14 +301,21 @@ AX_PKG(QT_INCLUDE, [], [], [QVector])
if test x"$host_vendor" = "xapple"; then
AX_PKG(QWT, [QT_INCLUDE], [-lqwt.5])
AX_PKG(GEOS, [], [-lgeos-3.0.0], [])
- AX_PKG(GSL, [LAPACK], [-lgsl -lgsl.0 -lgslcblas.0 ])
+ AX_PKG(GSL, [LAPACK], [-Wl,-no-as-needed,-lgsl,-lgsl.0,-lgslcblas.0,-as-needed])
AX_PKG(SUPERLU, [], [-lsuperlu_3.0], [])
AX_PKG(XERCESC, [], [-lxerces-c.28], [])
AX_PKG(QT, [QT_INCLUDE], [], [])
else
- AX_PKG(QWT, [QT_INCLUDE], [-lqwt])
+
+ AX_PKG(QWT_PLAIN, [QT_INCLUDE], [-lqwt])
+ if test "$HAVE_PKG_QWT_PLAIN" = "no"; then
+ AX_PKG(QWT, [QT_INCLUDE], [-lqwt-qt4])
+ else
+ AX_PKG(QWT, [QWT_PLAIN], [])
+ fi
+
AX_PKG(GEOS, [], [-lgeos])
- AX_PKG(GSL, [LAPACK], [-lgsl -lgslcblas])
+ AX_PKG(GSL, [LAPACK], [-Wl,-no-as-needed,-lgsl,-lgslcblas,-as-needed])
AX_PKG(SUPERLU, [], [-lsuperlu])
AX_PKG(XERCESC, [], [-lxerces-c])

0 comments on commit 7f46f21

Please sign in to comment.
Something went wrong with that request. Please try again.