Skip to content

Commit

Permalink
It compiles! (on os x)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jan 4, 2010
0 parents commit b3813f9
Show file tree
Hide file tree
Showing 73 changed files with 13,295 additions and 0 deletions.
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Martin Isenburg
martin.isenburg at gmail.com

Howard Butler
hobu.inc at gmail.com
505 changes: 505 additions & 0 deletions COPYING

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUBDIRS = src . include

lib_LTLIBRARIES = liblaszip.la

liblaszip_la_SOURCES =
liblaszip_la_LIBADD = src/liblibrary.la src/alternate_coder_src/liblaszip_alternate.la

liblaszip_la_LDFLAGS = -version-info 1:0:0
42 changes: 42 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
# $Id$
#
# Autotools boostrapping script
#
giveup()
{
echo
echo " Something went wrong, giving up!"
echo
exit 1
}

OSTYPE=`uname -s`

for libtoolize in glibtoolize libtoolize; do
LIBTOOLIZE=`which $libtoolize 2>/dev/null`
if test "$LIBTOOLIZE"; then
break;
fi
done

#AMFLAGS="--add-missing --copy --force-missing"
AMFLAGS="--add-missing --copy"
if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
AMFLAGS=$AMFLAGS" --include-deps";
fi

echo "Running aclocal "
aclocal || giveup
#echo "Running autoheader"
#autoheader || giveup
echo "Running libtoolize"
$LIBTOOLIZE --force --copy || giveup
echo "Running automake"
automake $AMFLAGS # || giveup
echo "Running autoconf"
autoconf || giveup

echo "======================================"
echo "Now you are ready to run './configure'"
echo "======================================"
147 changes: 147 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
dnl $Id$
dnl
dnl This is main autoconf bootstrap script of libLAS project.
dnl
m4_define([laszip_version_major], [0])
m4_define([laszip_version_minor], [1])
m4_define([laszip_version_micro], [0])
m4_define([laszip_version],
[laszip_version_major.laszip_version_minor.laszip_version_micro])

AC_PREREQ([2.59])
AC_INIT([laszip], [laszip_version], [[email protected]],[laszip-src])
AC_CANONICAL_BUILD

RELEASE_VERSION=laszip_version
AC_SUBST([RELEASE_VERSION])

dnl #########################################################################
dnl Default compilation flags
dnl #########################################################################

m4_define([debug_default],[no])

CFLAGS="-Wall -Wno-long-long -pedantic $CFLAGS"
CXXFLAGS="-Wall -Wno-long-long -pedantic -std=c++98 $CXXFLAGS"

dnl #########################################################################
dnl Checks for programs.
dnl #########################################################################

AM_INIT_AUTOMAKE([dist-bzip2])
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

dnl #########################################################################
dnl Check platform endianness
dnl #########################################################################

AC_C_BIGENDIAN

dnl #########################################################################
dnl Checks for header files.
dnl #########################################################################

AC_CHECK_HEADERS([string.h],, [AC_MSG_ERROR([cannot find string.h, bailing out])])
AC_CHECK_HEADERS([stdio.h],, [AC_MSG_ERROR([cannot find stdio.h, bailing out])])
AC_CHECK_HEADERS([stdlib.h],, [AC_MSG_ERROR([cannot find stdlib.h, bailing out])])


LIBS="${LIBS}"


dnl #########################################################################
dnl Build mode configuration (debug/optimized)
dnl #########################################################################

AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug=ARG], [Enable debug compilation mode @<:@yes|no@:>@, default=debug_default]),,)

AC_MSG_CHECKING([for debug enabled])

if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -g -DDEBUG"
CXXFLAGS="$CXXFLAGS -g -DDEBUG"
AC_MSG_RESULT(yes)
else
CFLAGS="$CFLAGS -O3 -DNDEBUG"
CXXFLAGS="$CXXFLAGS -O3 -DNDEBUG"
AC_MSG_RESULT(no)
fi

dnl #########################################################################
dnl Definiion of custom Autoconf macros
dnl #########################################################################

AC_DEFUN([LOC_MSG],[
echo "$1"
])

AC_DEFUN([AC_HAVE_LONG_LONG],
[
AC_MSG_CHECKING([for 64bit integer type])
echo 'int main() { long long off=0; }' >> conftest.c
if test -z "`${CC} -o conftest conftest.c 2>&1`" ; then
AC_DEFINE(HAVE_LONG_LONG, 1, [Define to 1, if your compiler supports long long data type])
AC_MSG_RESULT([long long])
else
AC_MSG_RESULT([no])
fi
rm -f conftest*
])




dnl #########################################################################
dnl Determine other features of compiler
dnl #########################################################################

AC_HAVE_LONG_LONG

dnl #########################################################################
dnl Checks for library functions.
dnl #########################################################################

AC_CHECK_FUNCS([gettimeofday bzero memset memcpy bcopy])

dnl #########################################################################
dnl Generate makefiles
dnl #########################################################################

AC_CONFIG_FILES([
Makefile
include/Makefile
src/Makefile
src/alternate_coder_src/Makefile
laszip-config
])

AC_OUTPUT

dnl #########################################################################
dnl Print configuration summary
dnl #########################################################################

LOC_MSG()
LOC_MSG([libLAS configuration summary:])
LOC_MSG()
LOC_MSG([ Version..................: ${RELEASE_VERSION}])
LOC_MSG([ Installation directory...: ${prefix}])
LOC_MSG([ C compiler...............: ${CC} ${CFLAGS}])
LOC_MSG([ C++ compiler.............: ${CXX} ${CXXFLAGS}])
LOC_MSG([ Debugging support........: ${enable_debug}])

LOC_MSG()
LOC_MSG([ LIBS.....................: ${LIBS}])
LOC_MSG()
LOC_MSG([ libLAS - http://liblas.org])
LOC_MSG()

dnl EOF
18 changes: 18 additions & 0 deletions include/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
laszipdir = $(includedir)/laszip

laszip_HEADERS = lasdefinitions.h \
laspointreader.h \
laspointreader0compressed.h \
laspointreader1compressed.h \
laspointreader2compressed.h \
laspointwriter0compressed.h \
laspointwriter1compressed.h \
laspointwriter2compressed.h \
laspointreader0raw.h \
laspointreader1raw.h \
laspointreader2raw.h \
laspointwriter0raw.h \
laspointwriter1raw.h \
laspointwriter2raw.h \
lasreader.h \
laswriter.h
Loading

0 comments on commit b3813f9

Please sign in to comment.