Skip to content
This repository
Browse code

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...
commit 61855a0fbe7bb561783be832025b4031d9a9a026 1 parent 3b27094
Morgon Kanter authored

Showing 2 changed files with 61 additions and 45 deletions. Show diff stats Hide diff stats

  1. +53 42 acinclude.m4
  2. +8 3 configure.ac
95 acinclude.m4
@@ -163,20 +163,20 @@ AC_DEFUN([AX_PKG],
163 163 else
164 164
165 165 if test "x$ENABLE_VERBOSE" = "yes"; then
166   - AC_MSG_RESULT([searching...])
  166 + AC_MSG_RESULT([searching...])
167 167 fi
168 168
169 169 HAVE_PKG_$1=no
170 170
171   - # This is a gross hack that causes the AC_LINK_IFELSE macro use libtool to
172   - # link files rather that g++ alone. This in important for detecting packages
173   - # like the Vision Workbench which has many dependencies that themselves have
174   - # *.la files.
  171 + # This is a gross hack that causes the AC_LINK_IFELSE macro use libtool to
  172 + # link files rather that g++ alone. This in important for detecting
  173 + # packages like the Vision Workbench which has many dependencies that
  174 + # themselves have *.la files.
175 175 OLD_CXX=$CXX
176 176 if test "$host_vendor" = apple; then
177   - # Apple has lazy link-time dependencies and a different name for libtool,
  177 + # Apple has lazy link-time dependencies and a different name for libtool,
178 178 # so we turn off this hack on the mac platform.
179   - CXX=$CXX
  179 + CXX=$CXX
180 180 else
181 181 CXX="libtool --mode=link $CXX"
182 182 fi
@@ -184,49 +184,60 @@ AC_DEFUN([AX_PKG],
184 184 ax_pkg_old_libs=$LIBS
185 185 LIBS=$PKG_$1_LIBS $LIBS
186 186 for path in none $PKG_PATHS; do
187   - ax_pkg_old_cppflags=$CPPFLAGS
188   - ax_pkg_old_ldflags=$LDFLAGS
189   - ax_pkg_old_vw_cppflags=$ASP_CPPFLAGS
190   - ax_pkg_old_vw_ldflags=$ASP_LDFLAGS
191   - echo > conftest.h
192   - for header in $4 ; do
193   - echo "#include <$header>" >> conftest.h
194   - done
195   - CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
196   - LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
197   - if test "$path" != "none"; then
198   - if test x"$ENABLE_VERBOSE" = "xyes"; then
199   - AC_MSG_CHECKING([for package $1 in $path])
200   - fi
  187 + ax_pkg_old_cppflags=$CPPFLAGS
  188 + ax_pkg_old_ldflags=$LDFLAGS
  189 + ax_pkg_old_vw_cppflags=$ASP_CPPFLAGS
  190 + ax_pkg_old_vw_ldflags=$ASP_LDFLAGS
  191 + echo > conftest.h
  192 + for header in $4 ; do
  193 + echo "#include <$header>" >> conftest.h
  194 + done
  195 + CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
  196 + LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
  197 + if test "$path" != "none"; then
  198 + if test x"$ENABLE_VERBOSE" = "xyes"; then
  199 + AC_MSG_CHECKING([for package $1 in $path])
  200 + fi
  201 +
  202 + # ISIS is really stupid, and they use /foo/inc as their include file
  203 + # location instead of /foo/include. So we check for that. This sees
  204 + # about any other idiot libraries that use the same design as well.
  205 + AX_INCLUDE_DIR=include
  206 + if ! test -d $path/${AX_INCLUDE_DIR}; then
  207 + if test -d $path/inc; then
  208 + AX_INCLUDE_DIR=inc
  209 + fi
  210 + fi
  211 +
201 212 if test -z "$5"; then
202   - ASP_CPPFLAGS="-I$path/include $ASP_CPPFLAGS"
203   - else
204   - ASP_CPPFLAGS="-I$path/include/$5 $ASP_CPPFLAGS"
  213 + ASP_CPPFLAGS="-I$path/${AX_INCLUDE_DIR} $ASP_CPPFLAGS"
  214 + else
  215 + ASP_CPPFLAGS="-I$path/${AX_INCLUDE_DIR}/$5 $ASP_CPPFLAGS"
205 216 fi
206   - CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
207   - AC_LINK_IFELSE(
208   - AC_LANG_PROGRAM([#include "conftest.h"],[]),
209   - [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
210   - ASP_LDFLAGS="-L$path/lib $ASP_LDFLAGS"
211   - LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
212   - fi
213   - AC_LINK_IFELSE(
214   - AC_LANG_PROGRAM([#include "conftest.h"],[]),
215   - [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
216   - if test x"$ENABLE_VERBOSE" = "xyes"; then
217   - AC_MSG_RESULT([no])
218   - fi
219   - CPPFLAGS=$ax_pkg_old_cppflags
220   - LDFLAGS=$ax_pkg_old_ldflags
221   - ASP_CPPFLAGS=$ax_pkg_old_vw_cppflags
222   - ASP_LDFLAGS=$ax_pkg_old_vw_ldflags
  217 + CPPFLAGS="$ax_pkg_old_cppflags $ASP_CPPFLAGS"
  218 + AC_LINK_IFELSE(
  219 + AC_LANG_PROGRAM([#include "conftest.h"],[]),
  220 + [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
  221 + ASP_LDFLAGS="-L$path/lib $ASP_LDFLAGS"
  222 + LDFLAGS="$ax_pkg_old_ldflags $ASP_LDFLAGS"
  223 + fi
  224 + AC_LINK_IFELSE(
  225 + AC_LANG_PROGRAM([#include "conftest.h"],[]),
  226 + [ HAVE_PKG_$1=yes ; AC_MSG_RESULT([yes]) ; break ] )
  227 + if test x"$ENABLE_VERBOSE" = "xyes"; then
  228 + AC_MSG_RESULT([no])
  229 + fi
  230 + CPPFLAGS=$ax_pkg_old_cppflags
  231 + LDFLAGS=$ax_pkg_old_ldflags
  232 + ASP_CPPFLAGS=$ax_pkg_old_vw_cppflags
  233 + ASP_LDFLAGS=$ax_pkg_old_vw_ldflags
223 234 done
224 235 CPPFLAGS=$ax_pkg_old_cppflags
225 236 LDFLAGS=$ax_pkg_old_ldflags
226 237 LIBS=$ax_pkg_old_libs
227 238
228 239 if test "x$HAVE_PKG_$1" = "xno" -a "x$ENABLE_VERBOSE" != "xyes"; then
229   - AC_MSG_RESULT([no (not found)])
  240 + AC_MSG_RESULT([no (not found)])
230 241 fi
231 242
232 243 CXX=$OLD_CXX
11 configure.ac
@@ -252,13 +252,18 @@ AX_PKG(OPENSCENEGRAPH, [], [-losg -losgDB -lOpenThreads -losgViewer -losgText -l
252 252 AX_PKG(MBA, [], [-lMBA_1.0_gpl_nopt], [MBA.h])
253 253 AX_PKG(SPICE, [], [-lcspice], [SpiceUsr.h SpiceZfc.h])
254 254
255   -AX_PKG(QT_INCLUDE, [], [], [QtCore/Qvector])
  255 +AX_PKG(QT_INCLUDE, [], [], [QtCore/QVector])
256 256 AX_PKG(QT_CORE, [QT_INCLUDE], [-lQtCore], [QVector], [QtCore])
257 257 AX_PKG(QT_GUI, [QT_INCLUDE], [-lQtGui], [QLabel], [QtGui])
258 258 AX_PKG(QT_SQL, [QT_INCLUDE], [-lQtSql], [QtSql],[QtSql])
259 259
260   -AX_PKG(ISIS3RDPARTY, [], [-lgeos -lxerces-c -lgsl -lgslcblas -lqwt -lstdc++])
261   -AX_PKG(ISIS, [QT_CORE QT_GUI QT_SQL SPICE ISIS3RDPARTY], [-lisis3])
  260 +dnl We need to link ISIS3RDPARTY against LAPACK because, on some systems,
  261 +dnl the ISIS compilation does not resolve certain BLAS symbols that its
  262 +dnl dependent 3rd party libraries depend on (for whatever retarded reason).
  263 +dnl Thus, we link against LAPACK here because it defines these missing
  264 +dnl BLAS symbols in the event that we need them.
  265 +AX_PKG(ISIS3RDPARTY, [LAPACK], [-lsuperlu_3.0 -lgeos -lxerces-c -lgsl -lgslcblas -lqwt -lstdc++])
  266 +AX_PKG(ISIS, [QT_INCLUDE QT_CORE QT_GUI QT_SQL SPICE ISIS3RDPARTY], [-lisis3])
262 267
263 268 dnl AX_PKG(SPICE, [], [-lcspice -lcsupport], [SpiceUsr.h SpiceZfc.h])
264 269 dnl AX_PKG(QT_CORE, [], [-lQtCore], [QVector], [QtCore QtCore])

0 comments on commit 61855a0

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