Permalink
Browse files

Massive reorganization. Works this time! A good handful of code has b…

…een sent to the graveyard (mostly gui). Code has been div'd up into 4 sections call Core, Sessions, IsisIO, & SpiceIO. Each one of those modules build a library that hopefully will allow outside code to link against ASP. Other than that most cc's and h' have remained the same with only fixes applied to their includes and with all extra whitespace removed.
  • Loading branch information...
1 parent e016b05 commit 9c0d10baf8c1e121e63e81fb4ce189799f09c45a Zack Moratto committed Sep 18, 2009
Showing with 3,292 additions and 2,564 deletions.
  1. +3 −7 Makefile.am
  2. +44 −29 configure.ac
  3. 0 {src → graveyard}/DEM.cc
  4. 0 {src → graveyard}/DEM.h
  5. 0 {deprecated → graveyard}/SurfaceNURBS.h
  6. 0 {src → graveyard}/TiePointTransform.h
  7. 0 {src → graveyard}/cuda_code.cu
  8. 0 {src → graveyard}/cuda_code.h
  9. 0 {src → graveyard}/cuda_test.cc
  10. 0 {src → graveyard}/gui/AlignmentWidget.cc
  11. 0 {src → graveyard}/gui/AlignmentWidget.h
  12. 0 {src → graveyard}/gui/CorrelationWidget.cc
  13. 0 {src → graveyard}/gui/CorrelationWidget.h
  14. 0 {src → graveyard}/gui/CostFunctionWidget.cc
  15. 0 {src → graveyard}/gui/CostFunctionWidget.h
  16. 0 {src → graveyard}/gui/InputWidget.cc
  17. 0 {src → graveyard}/gui/InputWidget.h
  18. 0 {src → graveyard}/gui/KyleStereo.h
  19. 0 {src → graveyard}/gui/MainWindow.cc
  20. 0 {src → graveyard}/gui/MainWindow.h
  21. 0 {src → graveyard}/gui/Noise.h
  22. 0 {src → graveyard}/gui/PreprocessWidget.cc
  23. 0 {src → graveyard}/gui/PreprocessWidget.h
  24. 0 {src → graveyard}/gui/PreviewGLWidget.cc
  25. 0 {src → graveyard}/gui/PreviewGLWidget.frag
  26. 0 {src → graveyard}/gui/PreviewGLWidget.h
  27. 0 {src → graveyard}/gui/QCompatFormLayout.h
  28. 0 {src → graveyard}/gui/SearchWindowWidget.cc
  29. 0 {src → graveyard}/gui/SearchWindowWidget.h
  30. 0 {src → graveyard}/gui/StereoGuiSession.cc
  31. 0 {src → graveyard}/gui/StereoGuiSession.h
  32. 0 {deprecated → graveyard}/nurbs.cc
  33. 0 {src → graveyard}/stereo_gui.cc
  34. +121 −0 m4/ax_module.m4
  35. +7 −260 src/Makefile.am
  36. +47 −0 src/asp/Core.h
  37. +8 −8 src/{Isis → asp/Core}/BaseEquation.h
  38. +1 −1 src/{ → asp/Core}/BlobIndexThreaded.cc
  39. 0 src/{ → asp/Core}/BlobIndexThreaded.h
  40. +5 −3 src/{ → asp/Core}/BundleAdjustUtils.cc
  41. +4 −4 src/{ → asp/Core}/BundleAdjustUtils.h
  42. +0 −20 src/{ → asp/Core}/CameraAdjust.h
  43. +9 −7 src/{ → asp/Core}/ControlNetworkLoader.cc
  44. +10 −10 src/{ → asp/Core}/ControlNetworkLoader.h
  45. +358 −0 src/asp/Core/DiskImageResourceDDD.cc
  46. +84 −0 src/asp/Core/DiskImageResourceDDD.h
  47. +11 −11 src/{Isis → asp/Core}/Equation.cc
  48. +8 −8 src/{Isis → asp/Core}/Equation.h
  49. +2 −2 src/{ → asp/Core}/InpaintView.h
  50. +40 −0 src/asp/Core/Makefile.am
  51. 0 src/{ → asp/Core}/MedianFilter.h
  52. +38 −38 src/{ → asp/Core}/OrthoRasterizer.h
  53. +19 −19 src/{Isis → asp/Core}/PolyEquation.cc
  54. +8 −8 src/{Isis → asp/Core}/PolyEquation.h
  55. +26 −26 src/{Isis → asp/Core}/RPNEquation.cc
  56. +14 −14 src/{Isis → asp/Core}/RPNEquation.h
  57. +41 −47 src/{ → asp/Core}/SoftwareRenderer.cc
  58. +6 −6 src/{ → asp/Core}/SoftwareRenderer.h
  59. 0 src/{ → asp/Core}/SparseView.h
  60. +1 −2 src/{ → asp/Core}/StereoSettings.cc
  61. 0 src/{ → asp/Core}/StereoSettings.h
  62. +394 −393 src/{ → asp/Core}/nff_terrain.cc
  63. +45 −47 src/{ → asp/Core}/nff_terrain.h
  64. +13 −0 src/asp/IsisIO.h
  65. +21 −21 src/{Isis → asp/IsisIO}/DiskImageResourceIsis.cc
  66. +9 −9 src/{Isis → asp/IsisIO}/DiskImageResourceIsis.h
  67. +26 −26 src/{Isis → asp/IsisIO}/IsisAdjustCameraModel.cc
  68. +16 −12 src/{Isis → asp/IsisIO}/IsisAdjustCameraModel.h
  69. +15 −15 src/{Isis → asp/IsisIO}/IsisCameraModel.cc
  70. +14 −14 src/{Isis → asp/IsisIO}/IsisCameraModel.h
  71. +30 −0 src/asp/IsisIO/Makefile.am
  72. +34 −0 src/asp/Makefile.am
  73. +18 −11 src/{stereo.h → asp/Sessions.h}
  74. +28 −29 src/{ → asp/Sessions}/HRSC/ExtoriExtrinsics.h
  75. +40 −39 src/{ → asp/Sessions}/HRSC/HRSC.cc
  76. +10 −10 src/{ → asp/Sessions}/HRSC/HRSC.h
  77. +18 −0 src/asp/Sessions/HRSC/Makefile.am
  78. +10 −12 src/{ → asp/Sessions}/HRSC/StereoSessionHRSC.cc
  79. +8 −8 src/{ → asp/Sessions}/HRSC/StereoSessionHRSC.h
  80. +17 −0 src/asp/Sessions/ISIS/Makefile.am
  81. +5 −5 src/{Isis → asp/Sessions/ISIS}/StereoSessionIsis.cc
  82. +28 −29 src/{Isis → asp/Sessions/ISIS}/StereoSessionIsis.h
  83. +17 −0 src/asp/Sessions/Keypoint/Makefile.am
  84. +24 −25 src/{ → asp/Sessions/Keypoint}/StereoSessionKeypoint.cc
  85. +6 −6 src/{ → asp/Sessions/Keypoint}/StereoSessionKeypoint.h
  86. +11 −11 src/{ → asp/Sessions}/MOC/Ephemeris.cc
  87. +6 −6 src/{ → asp/Sessions}/MOC/Ephemeris.h
  88. +33 −33 src/{ → asp/Sessions}/MOC/MOLA.cc
  89. +8 −8 src/{ → asp/Sessions}/MOC/MOLA.h
  90. +97 −97 src/{ → asp/Sessions/MOC}/MOLAReader.cc
  91. +18 −18 src/{ → asp/Sessions/MOC}/MOLAReader.h
  92. +18 −0 src/asp/Sessions/MOC/Makefile.am
  93. +93 −92 src/{ → asp/Sessions}/MOC/Metadata.cc
  94. +96 −91 src/{ → asp/Sessions}/MOC/Metadata.h
  95. +26 −28 src/{ → asp/Sessions}/MOC/StereoSessionMOC.cc
  96. +8 −8 src/{ → asp/Sessions}/MOC/StereoSessionMOC.h
  97. +36 −0 src/asp/Sessions/Makefile.am
  98. +17 −0 src/asp/Sessions/Pinhole/Makefile.am
  99. +78 −78 src/{ → asp/Sessions/Pinhole}/StereoSessionPinhole.cc
  100. +7 −7 src/{ → asp/Sessions/Pinhole}/StereoSessionPinhole.h
  101. +17 −0 src/asp/Sessions/RMAX/Makefile.am
  102. +5 −7 src/{ → asp/Sessions}/RMAX/RMAX.cc
  103. +5 −5 src/{ → asp/Sessions}/RMAX/RMAX.h
  104. +8 −8 src/{ → asp/Sessions}/RMAX/StereoSessionRmax.cc
  105. +7 −7 src/{ → asp/Sessions}/RMAX/StereoSessionRmax.h
  106. +2 −2 src/{ → asp/Sessions}/StereoSession.cc
  107. +11 −11 src/{ → asp/Sessions}/StereoSession.h
  108. +10 −0 src/asp/SpiceIO.h
  109. +28 −0 src/asp/SpiceIO/Makefile.am
  110. +40 −40 src/{ → asp/SpiceIO}/SpiceUtilities.cc
  111. +11 −11 src/{ → asp/SpiceIO}/SpiceUtilities.h
  112. +15 −17 src/{ → asp/SpiceIO}/TabulatedDataReader.cc
  113. +10 −10 src/{ → asp/SpiceIO}/TabulatedDataReader.h
  114. +144 −0 src/asp/Tools/Makefile.am
  115. +5 −15 src/{ → asp/Tools}/bundle_adjust.cc
  116. +485 −485 src/{ → asp/Tools}/bundlevis.cc
  117. +62 −62 src/{ → asp/Tools}/bundlevis.h
  118. +1 −1 src/{ → asp/Tools}/ctximage.cc
  119. 0 src/{ → asp/Tools}/disparitydebug.cc
  120. +8 −11 src/{ → asp/Tools}/isis_adjust.cc
  121. +3 −13 src/{ → asp/Tools}/orbitviz.cc
  122. +50 −64 src/{ → asp/Tools}/orthoproject.cc
  123. +5 −9 src/{ → asp/Tools}/point2dem.cc
  124. +21 −22 src/{ → asp/Tools}/point2mesh.cc
  125. 0 src/{ → asp/Tools}/point2mesh2.cc
  126. 0 src/{ → asp/Tools}/reconstruct.cc
  127. +3 −12 src/{ → asp/Tools}/results.cc
  128. +13 −13 src/{ → asp/Tools}/rmax2cahvor.cc
  129. +2 −2 src/{ → asp/Tools}/rmax_adjust.cc
  130. +8 −19 src/{ → asp/Tools}/stereo.cc
View
@@ -3,12 +3,12 @@
# Copyright (C) 2006 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration
# (NASA). All Rights Reserved.
-#
+#
# This software is distributed under the NASA Open Source Agreement
# (NOSA), version 1.3. The NOSA has been approved by the Open Source
# Initiative. See the file COPYING at the top of the distribution
# directory tree for the complete NOSA document.
-#
+#
# THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY
# KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
# LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO
@@ -31,7 +31,6 @@ EXTRA_DIST = \
INSTALLGUIDE \
config/rules.mak \
config/relicense \
- thirdparty/MBA-1.1 \
thirdparty/cxxtest \
data \
docs \
@@ -46,9 +45,6 @@ EXTRA_DIST = \
dist-hook:
rm -rf `find $(distdir) -name '.svn'`
- rm -f $(distdir)/thirdparty/MBA-1.1/lib/* \
- $(distdir)/thirdparty/MBA-1.1/app/mainSimplest \
- $(distdir)/thirdparty/MBA-1.1/app/mainSimplest.o
if DIST_LICENSE
cp $(DIST_LICENSE) $(distdir)/COPYING
endif
@@ -59,7 +55,7 @@ if DIST_CONFIG_OPTIONS_DEFAULT
cp $(DIST_CONFIG_OPTIONS_DEFAULT) $(distdir)/config/config.options.default
endif
-doxygen:
+doxygen:
cd src && doxygen
########################################################################
View
@@ -28,7 +28,7 @@ AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([nostdinc])
-AX_CONFIG_HEADER_PREFIX([src/asp_config.h], [ASP_])
+AX_CONFIG_HEADER_PREFIX([src/asp/asp_config.h], [ASP_])
dnl TODO RIGHT BEFORE RELEASE: update libtool version
dnl if abi changes in any way:
@@ -55,7 +55,6 @@ if test -f ./config.options; then
fi
-
##################################################
# Find the necessary programs
##################################################
@@ -77,8 +76,6 @@ AC_LANG(C++)
AX_COMMON_OPTIONS
-
-
##################################################
# Compilation options
##################################################
@@ -152,11 +149,9 @@ AX_PKG_ONE_OF(LAPACK,
AX_PKG(VW, [BOOST BOOST_THREAD BOOST_PROGRAM_OPTIONS BOOST_FILESYSTEM LAPACK], [-lvw], [vw/Image/ImageView.h vw/Math/LinearAlgebra.h])
AX_PKG(VW_CAMERA, [VW BOOST_IOSTREAMS], [-lvwCamera], [vw/Camera/CAHVModel.h])
-AX_PKG(VW_STEREO, [VW VW_CAMERA], [-lvwStereo], [vw/Stereo/OptimizedCorrelator.h])
-AX_PKG(VW_CARTOGRAPHY, [VW VW_CAMERA], [-lvwCartography], [vw/Cartography/GeoReference.h])
-AX_PKG(VW_INTEREST_POINT, [VW], [-lvwInterestPoint])
-
-AX_PKG(CUDA, [], [-lcuda -lcudart], [cuda.h])
+AX_PKG(VW_STEREO, [VW VW_CAMERA], [-lvwStereo], [vw/Stereo/OptimizedCorrelator.h])
+AX_PKG(VW_CARTOGRAPHY, [VW VW_CAMERA], [-lvwCartography], [vw/Cartography/GeoReference.h])
+AX_PKG(VW_INTEREST_POINT, [VW], [-lvwInterestPoint])
AX_PKG_ONE_OF(GL,
APPLE_GL,
@@ -220,6 +215,7 @@ AX_PKG(ISIS, [QT ISIS3RDPARTY], [-lisis3], [SpecialPixel.h])
# for backwards compatability with older versions of automake.
AM_CONDITIONAL(HAVE_PKG_SPICE, [test "$HAVE_PKG_SPICE" = "yes"])
AM_CONDITIONAL(HAVE_PKG_ISIS, [test "$HAVE_PKG_ISIS" = "yes"])
+AM_CONDITIONAL(HAVE_PKG_OPENSCENEGRAPH, [test "$HAVE_PKG_OPENSCENEGRAPH" = "yes"])
##################################################
# module definitions
@@ -229,26 +225,35 @@ AX_GROUP_PKG(BOOST_COMMON, [BOOST BOOST_PROGRAM_OPTIONS])
AX_GROUP_PKG(BOOST_ALL, [BOOST_COMMON BOOST_FILESYSTEM])
AX_GROUP_PKG(VW_ALL, [VW VW_CAMERA VW_CARTOGRAPHY VW_STEREO VW_INTEREST_POINT])
-AX_APP(STEREO, [src], yes, [BOOST_ALL VW_ALL LAPACK], [ISIS SPICE])
-AX_APP(STEREOGUI, [src], no, [BOOST_ALL VW_ALL LAPACK QT], [ISIS SPICE])
-AX_APP(ORTHOPROJECT, [src], yes, [BOOST_ALL VW_ALL LAPACK], [ISIS SPICE])
-AX_APP(BUNDLEADJUST, [src], no, [BOOST_ALL VW_ALL LAPACK], [ISIS SPICE])
-AX_APP(ORBITVIZ, [src], no, [BOOST_ALL VW_ALL LAPACK], [ISIS SPICE])
-AX_APP(DISPARITYDEBUG, [src], yes, [BOOST_COMMON VW VW_STEREO])
-AX_APP(POINT2MESH, [src], yes, [BOOST_COMMON VW OPENSCENEGRAPH])
-AX_APP(POINT2MESH2, [src], yes, [BOOST_COMMON VW OPENSCENEGRAPH])
-AX_APP(POINT2DEM, [src], yes, [BOOST_COMMON VW VW_CARTOGRAPHY])
-AX_APP(CTXIMAGE, [src], no, [BOOST_COMMON VW VW_CARTOGRAPHY])
-AX_APP(RMAX2CAHVOR, [src], no, [BOOST_COMMON VW VW_CAMERA BOOST_FILESYSTEM])
-AX_APP(RMAXADJUST, [src], no, [BOOST_ALL VW_ALL LAPACK])
-AX_APP(BUNDLEVIS, [src], no, [BOOST_COMMON OPENSCENEGRAPH VW VW_CAMERA])
-AX_APP(ISISADJUST, [src], yes, [BOOST_ALL VW_ALL LAPACK ISIS SPICE])
-AX_APP(RESULTS, [src], yes, [BOOST_ALL VW_ALL ISIS])
-AX_APP(CUDATEST, [src], no, [VW CUDA])
-AX_APP(RECONSTRUCT, [src], no, [BOOST_ALL VW VW_CARTOGRAPHY])
+AX_MODULE(CORE, [src/asp/Core], [libaspCore.la], yes, [], [BOOST_COMMON], [LAPACK OPENSCENEGRAPH])
+AX_MODULE(SPICEIO, [src/asp/SpiceIO], [libaspSpiceIO.la], yes, [CORE], [SPICE], [] )
+AX_MODULE(ISISIO, [src/asp/IsisIO], [libaspIsisIO.la], yes, [CORE], [ISIS VW VW_CAMERA], [] )
+AX_MODULE(SESSIONS, [src/asp/Sessions], [libaspSessions.la], yes, [ISISIO], [BOOST_COMMON], [SPICEIO ISISIO])
+
+AX_APP(STEREO, [src/asp/Tools], yes, [BOOST_ALL VW_ALL LAPACK CORE SESSIONS], [SPICEIO ISISIO])
+AX_APP(ORTHOPROJECT, [src/asp/Tools], yes, [BOOST_ALL VW_ALL LAPACK CORE SESSIONS], [SPICEIO ISISIO])
+AX_APP(BUNDLEADJUST, [src/asp/Tools], no, [BOOST_ALL VW_ALL LAPACK CORE SESSIONS], [SPICEIO ISISIO])
+AX_APP(ORBITVIZ, [src/asp/Tools], yes, [BOOST_ALL VW_ALL LAPACK CORE SESSIONS], [SPICEIO ISISIO])
+AX_APP(DISPARITYDEBUG, [src/asp/Tools], yes, [BOOST_COMMON VW VW_STEREO])
+AX_APP(POINT2MESH, [src/asp/Tools], yes, [BOOST_COMMON VW OPENSCENEGRAPH CORE])
+AX_APP(POINT2MESH2, [src/asp/Tools], yes, [BOOST_COMMON VW OPENSCENEGRAPH])
+AX_APP(POINT2DEM, [src/asp/Tools], yes, [BOOST_COMMON VW VW_CARTOGRAPHY CORE])
+AX_APP(CTXIMAGE, [src/asp/Tools], no, [BOOST_COMMON VW VW_CARTOGRAPHY CORE])
+AX_APP(RMAX2CAHVOR, [src/asp/Tools], no, [BOOST_COMMON VW VW_CAMERA BOOST_FILESYSTEM SESSIONS])
+AX_APP(RMAXADJUST, [src/asp/Tools], no, [BOOST_ALL VW_ALL LAPACK CORE SESSIONS])
+AX_APP(BUNDLEVIS, [src/asp/Tools], no, [BOOST_COMMON OPENSCENEGRAPH VW VW_CAMERA])
+AX_APP(ISISADJUST, [src/asp/Tools], yes, [BOOST_ALL VW_ALL LAPACK CORE ISISIO])
+AX_APP(RESULTS, [src/asp/Tools], yes, [BOOST_ALL VW_ALL ISISIO])
+AX_APP(RECONSTRUCT, [src/asp/Tools], no, [BOOST_ALL VW VW_CARTOGRAPHY])
+
# These are here (instead of inside the APP macro where they belong)
# for backwards compatability with older versions of automake.
+AM_CONDITIONAL(MAKE_MODULE_CORE, [test "$MAKE_MODULE_CORE" = "yes"])
+AM_CONDITIONAL(MAKE_MODULE_ISISIO, [test "$MAKE_MODULE_ISISIO" = "yes"])
+AM_CONDITIONAL(MAKE_MODULE_SPICEIO, [test "$MAKE_MODULE_SPICEIO" = "yes"])
+AM_CONDITIONAL(MAKE_MODULE_SESSIONS, [test "$MAKE_MODULE_SESSIONS" = "yes"])
+
AM_CONDITIONAL(MAKE_APP_STEREO, [test "$MAKE_APP_STEREO" = "yes"])
AM_CONDITIONAL(MAKE_APP_STEREOGUI, [test "$MAKE_APP_STEREOGUI" = "yes"])
AM_CONDITIONAL(MAKE_APP_ORTHOPROJECT, [test "$MAKE_APP_ORTHOPROJECT" = "yes"])
@@ -264,10 +269,8 @@ AM_CONDITIONAL(MAKE_APP_RMAXADJUST, [test "$MAKE_APP_RMAXADJUST" = "yes"])
AM_CONDITIONAL(MAKE_APP_BUNDLEVIS, [test "$MAKE_APP_BUNDLEVIS" = "yes"])
AM_CONDITIONAL(MAKE_APP_ISISADJUST, [test "$MAKE_APP_ISISADJUST" = "yes"])
AM_CONDITIONAL(MAKE_APP_RESULTS, [test "$MAKE_APP_RESULTS" = "yes"])
-AM_CONDITIONAL(MAKE_APP_CUDATEST, [test "$MAKE_APP_CUDATEST" = "yes"])
AM_CONDITIONAL(MAKE_APP_RECONSTRUCT, [test "$MAKE_APP_RECONSTRUCT" = "yes"])
-
##################################################
# final processing
##################################################
@@ -299,7 +302,19 @@ AC_SUBST(ASP_LDFLAGS)
AC_CONFIG_FILES([ \
Makefile \
src/Makefile \
- src/tests/Makefile \
+ src/asp/Makefile \
+ src/asp/Core/Makefile \
+ src/asp/SpiceIO/Makefile \
+ src/asp/IsisIO/Makefile \
+ src/asp/Sessions/Makefile \
+ src/asp/Sessions/HRSC/Makefile \
+ src/asp/Sessions/ISIS/Makefile \
+ src/asp/Sessions/Keypoint/Makefile \
+ src/asp/Sessions/MOC/Makefile \
+ src/asp/Sessions/MRO/Makefile \
+ src/asp/Sessions/Pinhole/Makefile \
+ src/asp/Sessions/RMAX/Makefile \
+ src/asp/Tools/Makefile
])
AC_OUTPUT
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,121 @@
+dnl __BEGIN_LICENSE__
+dnl Copyright (C) 2006, 2007 United States Government as represented by
+dnl the Administrator of the National Aeronautics and Space Administration.
+dnl All Rights Reserved.
+dnl __END_LICENSE__
+
+# Usage: AX_MODULE(<name>, <directory>, <library>, <default>, <prerequisites>, <required dependencies>[, <optional dependencies>])
+AC_DEFUN([AX_MODULE],
+[
+ m4_ifdef([_AX_MODULE_PREPARE], [],
+ [
+ realpath() {
+ cd "[$]1" 2>/dev/null 1>&2 && pwd
+ }
+
+ abspath() {
+ if test ${1#/} = [$]1; then
+ echo "$PWD/[$]1"
+ else
+ echo [$]1
+ fi
+ }
+
+ var_uniq() {
+ echo -n "[$]*" | sed 's/ \+/\n/g' | sed -n 'G; s/\n/&&/; /^\(@<:@^\n@:>@*\n\).*\n\1/d; s/\n//; h; P' | tr '\n' ' '
+ }
+
+ get_rpath() {
+ for i in "[$]@"; do
+ case [$i] in
+ -L*) v="`abspath ${i#-L}`"; if test -n "$v"; then echo -n " -R$v"; fi;;
+ esac
+ done
+ echo
+ }
+ m4_define([_AX_MODULE_PREPARE], [1])
+ ])
+
+ # Silently ignore modules that don't exist in this distribution
+ if test -d "$srcdir/$2" ; then
+
+ HAVE_PKG_$1_SRC=yes
+
+ if test -n "$ENABLE_MODULE_$1"; then
+ WANT_MODULE_$1="$ENABLE_MODULE_$1"
+ fi
+
+ AC_ARG_ENABLE([module-]m4_tolower([[$1]]),
+ AC_HELP_STRING([--enable-module-]m4_tolower([[$1]]), [enable the $1 module @<:@$4@:>@]),
+ [ ENABLE_MODULE_$1=$enableval; WANT_MODULE_$1=$enableval; ],
+ [ if test x"$ENABLE_MODULE_$1" = x; then ENABLE_MODULE_$1=`/bin/echo -n $4 | tr [A-Z] [a-z]` ; fi ]
+ )
+
+ AC_MSG_CHECKING([whether to build module $1])
+ ax_module_enable=$ENABLE_MODULE_$1
+
+ # Create a variable to store missing
+ AS_VAR_PUSHDEF([missing], [ax_module_]$1[_missing])
+
+ # Load args 5 and 6 as required deps, and capture missing deps in missing var.
+ # If missing is populated, bail out. Then load the optional deps
+ AS_IF([test x"$ax_module_enable" != "xyes"], [AC_MSG_RESULT([no (disabled)])],
+ [AX_LOAD_DEPS([$1], [$5 $6], [missing]) # Load required deps
+ AS_IF([test -n "$missing"], [AC_MSG_RESULT([no ([missing] $missing)]); ax_module_enable=no],
+ [AX_LOAD_DEPS([$1], [$7]) # Load optional deps
+ MODULE_$1_CPPFLAGS="$PKG_$1_CPPFLAGS"
+ if test x"$ENABLE_RPATH" = "xyes"; then
+ PKG_$1_LIBS="$PKG_$1_LIBS `var_uniq \`get_rpath ${PKG_$1_LIBS}\``"
+ fi
+ MODULE_$1_LIBS="$PKG_$1_LIBS"
+ m4_ifval([$3], [PKG_$1_LIBS="$PKG_$1_LIBS \$(top_builddir)/$2/$3"])
+ AC_MSG_RESULT([yes])])])
+
+ AS_VAR_POPDEF([missing])
+
+ else
+ HAVE_PKG_$1_SRC=no
+ ax_module_enable=no
+ MODULE_$1_LIBS=
+ PKG_$1_LIBS=
+ MODULE_$1_CPPFLAGS=
+ PKG_$1_CPPFLAGS=
+ fi
+
+ AC_SUBST(MODULE_$1_CPPFLAGS)
+ AC_SUBST(PKG_$1_CPPFLAGS)
+ AC_SUBST(MODULE_$1_LIBS)
+ AC_SUBST(PKG_$1_LIBS)
+
+ HAVE_PKG_$1=${ax_module_enable}
+ MAKE_MODULE_$1=${ax_module_enable}
+ AC_SUBST(MAKE_MODULE_$1)
+
+ if test -n "$WANT_MODULE_$1"; then
+ if test x"$MAKE_MODULE_$1" != x"$WANT_MODULE_$1"; then
+ AC_MSG_ERROR([You said ENABLE_MODULE_]$1[=$WANT_MODULE_]$1[, but I decided $MAKE_MODULE_]$1)
+ fi
+ fi
+
+ if test "${HAVE_PKG_$1}" = "yes" ; then
+ ax_have_pkg_bool=1
+ else
+ ax_have_pkg_bool=0
+ fi
+ AC_DEFINE_UNQUOTED(HAVE_PKG_$1,
+ [$ax_have_pkg_bool],
+ [Define to 1 if the $1 module is available.])
+
+ if test "$HAVE_PKG_$1_SRC" = "yes" ; then
+ AX_LOG([MAKE_MODULE_]$1[ = $MAKE_MODULE_]$1)
+ AX_LOG([HAVE_PKG_]$1[ = $HAVE_PKG_]$1)
+ AX_LOG([MODULE_]$1[_CPPFLAGS = $MODULE_]$1[_CPPFLAGS])
+ AX_LOG([PKG_]$1[_CPPFLAGS = $PKG_]$1[_CPPFLAGS])
+ AX_LOG([MODULE_]$1[_LIBS = $MODULE_]$1[_LIBS])
+ AX_LOG([PKG_]$1[_LIBS = $PKG_]$1[_LIBS])
+ fi
+
+ # We're putting these in configure.ac manually by now, for
+ # backwards compatability with older versions of automake.
+ # AM_CONDITIONAL([MAKE_MODULE_$1], [test "$MAKE_MODULE_$1" = "yes"])
+])
Oops, something went wrong.

0 comments on commit 9c0d10b

Please sign in to comment.