Permalink
Browse files

Merged the buildfixes branch onto trunk (r249:r257). This should (hop…

…efully) make the link against ISIS work fine on all platforms.
  • Loading branch information...
1 parent 3b27094 commit 61855a0fbe7bb561783be832025b4031d9a9a026 Morgon Kanter committed Jul 4, 2008
Showing with 61 additions and 45 deletions.
  1. +53 −42 acinclude.m4
  2. +8 −3 configure.ac
View
95 acinclude.m4
@@ -163,70 +163,81 @@ AC_DEFUN([AX_PKG],
else
if test "x$ENABLE_VERBOSE" = "yes"; then
- AC_MSG_RESULT([searching...])
+ AC_MSG_RESULT([searching...])
fi
HAVE_PKG_$1=no
- # This is a gross hack that causes the AC_LINK_IFELSE macro use libtool to
- # link files rather that g++ alone. This in important for detecting packages
- # like the Vision Workbench which has many dependencies that themselves have
- # *.la files.
+ # This is a gross hack that causes the AC_LINK_IFELSE macro use libtool to
+ # link files rather that g++ alone. This in important for detecting
+ # packages like the Vision Workbench which has many dependencies that
+ # themselves have *.la files.
OLD_CXX=$CXX
if test "$host_vendor" = apple; then
- # Apple has lazy link-time dependencies and a different name for libtool,
+ # Apple has lazy link-time dependencies and a different name for libtool,
# so we turn off this hack on the mac platform.
- CXX=$CXX
+ CXX=$CXX
else
CXX="libtool --mode=link $CXX"
fi
ax_pkg_old_libs=$LIBS
LIBS=$PKG_$1_LIBS $LIBS
for path in none $PKG_PATHS; do
- ax_pkg_old_cppflags=$CPPFLAGS
- ax_pkg_old_ldflags=$LDFLAGS
- ax_pkg_old_vw_cppflags=$ASP_CPPFLAGS
- ax_pkg_old_vw_ldflags=$ASP_LDFLAGS
- echo > conftest.h
- for header in $4 ; do
- echo "#include <$header>" >> conftest.h
- done
- CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
- LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
- if test "$path" != "none"; then
- if test x"$ENABLE_VERBOSE" = "xyes"; then
- AC_MSG_CHECKING([for package $1 in $path])
- fi
+ ax_pkg_old_cppflags=$CPPFLAGS
+ ax_pkg_old_ldflags=$LDFLAGS
+ ax_pkg_old_vw_cppflags=$ASP_CPPFLAGS
+ ax_pkg_old_vw_ldflags=$ASP_LDFLAGS
+ echo > conftest.h
+ for header in $4 ; do
+ echo "#include <$header>" >> conftest.h
+ done
+ CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
+ LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
+ if test "$path" != "none"; then
+ if test x"$ENABLE_VERBOSE" = "xyes"; then
+ AC_MSG_CHECKING([for package $1 in $path])
+ fi
+
+ # ISIS is really stupid, and they use /foo/inc as their include file
+ # location instead of /foo/include. So we check for that. This sees
+ # about any other idiot libraries that use the same design as well.
+ AX_INCLUDE_DIR=include
+ if ! test -d $path/${AX_INCLUDE_DIR}; then
+ if test -d $path/inc; then
+ AX_INCLUDE_DIR=inc
+ fi
+ fi
+
if test -z "$5"; then
- ASP_CPPFLAGS="-I$path/include $ASP_CPPFLAGS"
- else
- ASP_CPPFLAGS="-I$path/include/$5 $ASP_CPPFLAGS"
+ ASP_CPPFLAGS="-I$path/${AX_INCLUDE_DIR} $ASP_CPPFLAGS"
+ else
+ ASP_CPPFLAGS="-I$path/${AX_INCLUDE_DIR}/$5 $ASP_CPPFLAGS"
fi
- CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM([#include "conftest.h"],[]),
- [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
- ASP_LDFLAGS="-L$path/lib $ASP_LDFLAGS"
- LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
- fi
- AC_LINK_IFELSE(
- AC_LANG_PROGRAM([#include "conftest.h"],[]),
- [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
- if test x"$ENABLE_VERBOSE" = "xyes"; then
- AC_MSG_RESULT([no])
- fi
- CPPFLAGS=$ax_pkg_old_cppflags
- LDFLAGS=$ax_pkg_old_ldflags
- ASP_CPPFLAGS=$ax_pkg_old_vw_cppflags
- ASP_LDFLAGS=$ax_pkg_old_vw_ldflags
+ CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
+ AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include "conftest.h"],[]),
+ [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
+ ASP_LDFLAGS="-L$path/lib $ASP_LDFLAGS"
+ LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
+ fi
+ AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([#include "conftest.h"],[]),
+ [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
+ if test x"$ENABLE_VERBOSE" = "xyes"; then
+ AC_MSG_RESULT([no])
+ fi
+ CPPFLAGS=$ax_pkg_old_cppflags
+ LDFLAGS=$ax_pkg_old_ldflags
+ ASP_CPPFLAGS=$ax_pkg_old_vw_cppflags
+ ASP_LDFLAGS=$ax_pkg_old_vw_ldflags
done
CPPFLAGS=$ax_pkg_old_cppflags
LDFLAGS=$ax_pkg_old_ldflags
LIBS=$ax_pkg_old_libs
if test "x$HAVE_PKG_$1" = "xno" -a "x$ENABLE_VERBOSE" != "xyes"; then
- AC_MSG_RESULT([no (not found)])
+ AC_MSG_RESULT([no (not found)])
fi
CXX=$OLD_CXX
View
11 configure.ac
@@ -252,13 +252,18 @@ AX_PKG(OPENSCENEGRAPH, [], [-losg -losgDB -lOpenThreads -losgViewer -losgText -l
AX_PKG(MBA, [], [-lMBA_1.0_gpl_nopt], [MBA.h])
AX_PKG(SPICE, [], [-lcspice], [SpiceUsr.h SpiceZfc.h])
-AX_PKG(QT_INCLUDE, [], [], [QtCore/Qvector])
+AX_PKG(QT_INCLUDE, [], [], [QtCore/QVector])
AX_PKG(QT_CORE, [QT_INCLUDE], [-lQtCore], [QVector], [QtCore])
AX_PKG(QT_GUI, [QT_INCLUDE], [-lQtGui], [QLabel], [QtGui])
AX_PKG(QT_SQL, [QT_INCLUDE], [-lQtSql], [QtSql],[QtSql])
-AX_PKG(ISIS3RDPARTY, [], [-lgeos -lxerces-c -lgsl -lgslcblas -lqwt -lstdc++])
-AX_PKG(ISIS, [QT_CORE QT_GUI QT_SQL SPICE ISIS3RDPARTY], [-lisis3])
+dnl We need to link ISIS3RDPARTY against LAPACK because, on some systems,
+dnl the ISIS compilation does not resolve certain BLAS symbols that its
+dnl dependent 3rd party libraries depend on (for whatever retarded reason).
+dnl Thus, we link against LAPACK here because it defines these missing
+dnl BLAS symbols in the event that we need them.
+AX_PKG(ISIS3RDPARTY, [LAPACK], [-lsuperlu_3.0 -lgeos -lxerces-c -lgsl -lgslcblas -lqwt -lstdc++])
+AX_PKG(ISIS, [QT_INCLUDE QT_CORE QT_GUI QT_SQL SPICE ISIS3RDPARTY], [-lisis3])
dnl AX_PKG(SPICE, [], [-lcspice -lcsupport], [SpiceUsr.h SpiceZfc.h])
dnl AX_PKG(QT_CORE, [], [-lQtCore], [QVector], [QtCore QtCore])

0 comments on commit 61855a0

Please sign in to comment.