Changeset 823
- Timestamp:
- 08/11/08 07:12:24 (4 months ago)
- Location:
- trunk
- Files:
-
- 3 modified
-
apps/Makefile.am (modified) (1 diff)
-
configure.ac (modified) (7 diffs)
-
src/Makefile.am (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/apps/Makefile.am
r818 r823 1 AM_CFLAGS = @GDAL_INC@ -I../include/liblas/capi -I../include 2 AM_CXXFLAGS = @GDAL_INC@ -I../include 1 if GDAL_IS_CONFIG 2 GDAL_CPPFLAGS = @GDAL_INC@ -DHAVE_GDAL=1 3 endif 4 5 AM_CPPFLAGS = $(GDAL_CPPFLAGS) -I../include/liblas/capi -I../include 3 6 4 7 lasinfo_SOURCES = lasinfo.c lascommon.c -
trunk/configure.ac
r818 r823 15 15 RELEASE_VERSION=liblas_version 16 16 17 dnl ######################################################################### 17 18 dnl Default compilation flags 19 dnl ######################################################################### 20 18 21 debug_default="no" 19 22 CFLAGS="-Wall -Wno-long-long -pedantic $CFLAGS" 20 23 CXXFLAGS="-Wall -Wno-long-long -pedantic -std=c++98 $CXXFLAGS" 21 24 25 dnl ######################################################################### 22 26 dnl Checks for programs. 27 dnl ######################################################################### 28 23 29 AM_INIT_AUTOMAKE 24 30 AC_PROG_CXX … … 29 35 AC_PROG_LIBTOOL 30 36 37 dnl ######################################################################### 31 38 dnl Check platform endianness 39 dnl ######################################################################### 40 32 41 AC_C_BIGENDIAN 33 42 43 dnl ######################################################################### 34 44 dnl Checks for header files. 45 dnl ######################################################################### 46 35 47 AC_CHECK_HEADERS([string.h],, [AC_MSG_ERROR([cannot find string.h, bailing out])]) 36 48 AC_CHECK_HEADERS([stdio.h],, [AC_MSG_ERROR([cannot find stdio.h, bailing out])]) 37 49 AC_CHECK_HEADERS([stdlib.h],, [AC_MSG_ERROR([cannot find stdlib.h, bailing out])]) 38 50 39 LIBS="$LIBS" 40 41 AC_ARG_ENABLE([debug], [ --enable-debug=[no/yes] turn on debugging [default=$debug_default]],, enable_debug=$debug_default) 51 52 LIBS="${LIBS}" 53 54 55 dnl ######################################################################### 56 dnl Build mode configuration (debug/optimized) 57 dnl ######################################################################### 58 59 AC_ARG_ENABLE([debug], 60 AC_HELP_STRING([--enable-debug=ARG], [Enable debug compilation mode [yes or no, default=${debug_default}]]),,) 42 61 43 62 if test "x$enable_debug" = "xyes"; then … … 51 70 fi 52 71 72 dnl ######################################################################### 73 dnl Definiion of custom Autoconf macros 74 dnl ######################################################################### 75 53 76 AC_DEFUN([LOC_MSG],[ 54 77 echo "$1" … … 57 80 AC_DEFUN([AC_HAVE_LONG_LONG], 58 81 [ 59 AC_MSG_CHECKING([for 64bit integer type])60 61 echo 'int main() { long long off=0; }' >> conftest.c62 if test -z "`${CC} -o conftest conftest.c 2>&1`" ; then63 AC_DEFINE(HAVE_LONG_LONG, 1, [Define to 1, if your compiler supports long long data type])64 AC_MSG_RESULT([long long])65 else66 AC_MSG_RESULT([no])67 fi68 rm -f conftest*82 AC_MSG_CHECKING([for 64bit integer type]) 83 84 echo 'int main() { long long off=0; }' >> conftest.c 85 if test -z "`${CC} -o conftest conftest.c 2>&1`" ; then 86 AC_DEFINE(HAVE_LONG_LONG, 1, [Define to 1, if your compiler supports long long data type]) 87 AC_MSG_RESULT([long long]) 88 else 89 AC_MSG_RESULT([no]) 90 fi 91 rm -f conftest* 69 92 ]) 70 93 71 dnl ########################################################### 72 dnl GDAL 73 dnl ########################################################### 94 dnl ######################################################################### 95 dnl Determine GDAL Support 96 dnl ######################################################################### 97 74 98 AC_ARG_WITH([gdal], 75 99 AC_HELP_STRING([--with-gdal=ARG], [Path to gdal-config]),,) … … 79 103 GDAL_CONFIG="no" 80 104 if test "$with_gdal" = "no" -o "$with_gdal" = "" ; then 81 AC_MSG_RESULT([no])105 AC_MSG_RESULT([no]) 82 106 else 83 if test "`basename xx/$with_gdal`" = "gdal-config" ; then 84 AC_MSG_RESULT([GDAL enabled with provided gdal-config]) 85 GDAL_CONFIG="$with_gdal" 86 else 87 AC_MSG_ERROR([--with-gdal should have yes or a path to gdal-config]) 88 fi 89 fi 107 108 dnl Check if full path to gdal-config provided 109 if test "`basename xx/$with_gdal`" = "gdal-config" ; then 110 AC_MSG_RESULT([GDAL enabled with provided gdal-config]) 111 GDAL_CONFIG="$with_gdal" 112 else 113 dnl --with-gdal=yes given, so try to find gdal-config in PATH 114 GDAL_CONFIG_TMP=`which gdal-config` 115 if test "`basename xx/${GDAL_CONFIG_TMP}`" = "gdal-config" ; then 116 AC_MSG_RESULT([GDAL enabled with gdal-config found in PATH]) 117 GDAL_CONFIG=${GDAL_CONFIG_TMP} 118 else 119 AC_MSG_ERROR([--with-gdal should have yes or a path to gdal-config]) 120 fi 121 fi 122 fi 123 90 124 if test "$GDAL_CONFIG" != "no" ; then 91 VERSION=`$GDAL_CONFIG --version`92 AC_MSG_RESULT([$GDAL_CONFIG reports version $VERSION])93 LIBS="`$GDAL_CONFIG --libs` $LIBS"94 GDAL_INC=`$GDAL_CONFIG --cflags`95 GDAL_PREFIX=`$GDAL_CONFIG --prefix`96 OGR=`$GDAL_CONFIG --ogr-enabled`97 if test "$OGR" != "yes" ; then98 AC_MSG_ERROR([$GDAL_CONFIG says OGR is not enabled])99 fi100 101 HAVE_GDAL="yes" 102 fi 125 VERSION=`$GDAL_CONFIG --version` 126 AC_MSG_RESULT([$GDAL_CONFIG reports version $VERSION]) 127 LIBS="`$GDAL_CONFIG --libs` $LIBS" 128 GDAL_INC=`$GDAL_CONFIG --cflags` 129 GDAL_PREFIX=`$GDAL_CONFIG --prefix` 130 OGR=`$GDAL_CONFIG --ogr-enabled` 131 if test "$OGR" != "yes" ; then 132 AC_MSG_ERROR([$GDAL_CONFIG says OGR is not enabled]) 133 fi 134 HAVE_GDAL="yes" 135 fi 136 103 137 AC_SUBST([GDAL_INC]) 104 138 AC_SUBST([GDAL_PREFIX]) 105 139 AM_CONDITIONAL([GDAL_IS_CONFIG], [test ! x$GDAL_CONFIG = xno]) 106 140 107 dnl --------------------------------------------------------------------------- 108 dnl Select a libgeotiff library to use. 109 dnl --------------------------------------------------------------------------- 110 111 AC_ARG_WITH(geotiff,[ --with-geotiff=ARG Libgeotiff library to use (yes or path)],,) 141 dnl ######################################################################### 142 dnl Determine GeoTIFF Support 143 dnl ######################################################################### 144 145 AC_ARG_WITH([geotiff], 146 AC_HELP_STRING([--with-geotiff=ARG], [libgeotiff library to use (yes or path)]),,) 112 147 AC_MSG_CHECKING([for libgeotiff]) 113 148 114 149 HAVE_GEOTIFF="no" 115 150 GEOTIFF_CONFIG="no" 151 116 152 if test "$with_geotiff" = "no" -o "$with_geotiff" = "" ; then 117 118 AC_MSG_RESULT([no]) 119 153 AC_MSG_RESULT([no]) 120 154 else 121 155 122 GEOTIFF_CONFIG=external123 dnl We now require libgeotiff 1.2.1 (for XTIFFClientOpen). 124 dnl first check if $with_geotiff/lib has the library:125 AC_CHECK_LIB([geotiff], [XTIFFClientOpen],126 [GEOTIFF_CONFIG=external],127 [GEOTIFF_CONFIG=no],128 [-L$with_geotiff/lib])129 fi 130 131 if test "$ GEOTIFF_CONFIG" != "no" ; then132 133 if test $GEOTIFF_CONFIG= "external" ; then134 LIBS="-L$with_geotiff/lib -lgeotiff $LIBS"135 if test -d $with_geotiff/include ; then136 GEOTIFF_INC="-I$with_geotiff/include"137 AC_MSG_RESULT([using libgeotiff from $with_geotiff/include])138 fi139 fi140 141 HAVE_GEOTIFF="yes"142 143 fi 144 145 AC_SUBST( GEOTIFF_INC GEOTIFF_PREFIX)156 GEOTIFF_CONFIG=external 157 158 dnl We now require libgeotiff 1.2.1 (for XTIFFClientOpen). 159 dnl first check if $with_geotiff/lib has the library: 160 AC_CHECK_LIB([geotiff], [XTIFFClientOpen], 161 [GEOTIFF_CONFIG=external], [GEOTIFF_CONFIG=no], 162 [-L$with_geotiff/lib]) 163 fi 164 165 if test "${GEOTIFF_CONFIG}" != "no" ; then 166 167 if test "${GEOTIFF_CONFIG}" = "external" ; then 168 LIBS="-L$with_geotiff/lib -lgeotiff $LIBS" 169 if test -d ${with_geotiff}/include ; then 170 dnl Second path is for Debian using $prefix/include/geotiff/geotiff.h 171 GEOTIFF_INC="-I$with_geotiff/include -I$with_geotiff/include/geotiff" 172 AC_MSG_RESULT([using libgeotiff from $with_geotiff/include]) 173 fi 174 fi 175 HAVE_GEOTIFF="yes" 176 fi 177 178 AC_SUBST([GEOTIFF_INC]) 179 AC_SUBST([GEOTIFF_PREFIX]) 146 180 AM_CONDITIONAL([GEOTIFF_IS_CONFIG], [test ! x$GEOTIFF_CONFIG = xno]) 147 181 182 dnl ######################################################################### 183 dnl Determine other features of compiler 184 dnl ######################################################################### 185 148 186 AC_HAVE_LONG_LONG 149 187 188 dnl ######################################################################### 150 189 dnl Checks for library functions. 190 dnl ######################################################################### 191 151 192 AC_CHECK_FUNCS([gettimeofday bzero memset memcpy bcopy]) 193 194 dnl ######################################################################### 195 dnl Generate makefiles 196 dnl ######################################################################### 152 197 153 198 AC_CONFIG_FILES([ … … 163 208 AC_OUTPUT 164 209 165 dnl -------------------------------------------------------------------210 dnl ######################################################################### 166 211 dnl Print configuration summary 167 dnl ------------------------------------------------------------------- 212 dnl ######################################################################### 213 168 214 LOC_MSG() 169 215 LOC_MSG([libLAS configuration summary:]) … … 193 239 LOC_MSG([ libLAS - http://liblas.org]) 194 240 LOC_MSG() 241 242 dnl EOF -
trunk/src/Makefile.am
r760 r823 2 2 SUBDIRS = detail . 3 3 4 INCLUDES = -I../include -I../include/detail5 6 4 if GEOTIFF_IS_CONFIG 7 AM_CPPFLAGS=@GEOTIFF_INC@ -DHAVE_LIBGEOTIFF=15 GEOTIFF_CPPFLAGS = @GEOTIFF_INC@ -DHAVE_LIBGEOTIFF=1 8 6 endif 9 7 8 AM_CPPFLAGS = $(GEOTIFF_CPPFLAGS) -I../include -I../include/detail 10 9 11 10 lib_LTLIBRARIES = liblas.la
