Source

lrc / configure.in

#      configure.in
#
#      Copyright 2011, 2012 Andreas Tscharner <andy@vis.ethz.ch>
#
#      This program is free software; you can redistribute it and/or modify
#      it under the terms of the GNU Lesser General Public License as
#      published by the Free Software Foundation; either version 3 of the
#      License, or (at your option) any later version.
#
#      This program is distributed in the hope that it will be useful,
#      but WITHOUT ANY WARRANTY; without even the implied warranty of
#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#      GNU General Public License for more details.
#
#      You should have received a copy of the GNU Lesser General Public
#      License along with this program; if not, write to the Free Software
#      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#      MA 02110-1301, USA.


#
# Initialize
AC_INIT([Linux Resource Compiler], [1.0-RC1], [https://bitbucket.org/StarFire/lrc/issues/new], [lrc])
AC_CONFIG_SRCDIR(src/lrcExceptions.hxx)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(src/lrc_config.h)

#
# Check for programs
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_CHECK_PROG(doxy_ok, doxygen, yes, no)

#
# Check for libraries
AC_CHECK_LIB(z, zlibVersion, zLib_ok=yes, zLib_ok=no)
AC_CHECK_LIB(bz2, BZ2_bzlibVersion, bz2Lib_ok=yes, bz2Lib_ok=no)
AC_CHECK_LIB(SDL, SDL_Init, SDL_ok=yes, SDL_ok=no)
AC_CHECK_LIB(SDL_image, IMG_Init, SDLIMAGE_ok=yes, SDLIMAGE_ok=no)
PKG_CHECK_EXISTS([tinyxml], [TINYXML_ok="yes"], [TINYXML_ok="no (using internal)"])
PKG_CHECK_EXISTS([libcryptopp], [CRYPTOPP_ok="yes"], [CRYPTOPP_ok="no (using internal)"])
PKG_CHECK_EXISTS([libcrypto++], [PPCRYPTO_ok="yes"], [PPCRYPTO_ok="no (using internal)"])

#
# Check for header files
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_HEADERS_ONCE([sys/stat.h])

#
# Check for typedefs, structures and compiler characteristics
AC_C_CONST
AC_C_INLINE
#AC_CXX_COMPILE_STDCXX_0X    not supported at the moment

#
# Check for some special things
AC_ARG_ENABLE(debug,
              AC_HELP_STRING([--enable-debug], [Enable debugging (debug flags, no optimization)]),
              [LRC_DEBUG="yes"],
              [LRC_DEBUG="no (optimize)"])
AM_CONDITIONAL(DEBUG, test "$LRC_DEBUG" = yes)
AC_ARG_ENABLE(encryption,
              AC_HELP_STRING([--disable-encryption],
                             [Disable encryption (no compilation and linking of cryptopp)]),,
              [LRC_ENCRYPTION="yes"])
AM_CONDITIONAL([NO_ENCRYPTION], [test "$LRC_ENCRYPTION" != yes])
if test "$LRC_ENCRYPTION" != yes; then
  AC_DEFINE([NO_ENCRYPTION], [], [Disable encryption])
fi
AM_CONDITIONAL(HAVE_DOXYGEN, test "$doxy_ok" = yes)
AM_CONDITIONAL(HAVE_ZLIB, test "$zLib_ok" = yes)
AM_CONDITIONAL(HAVE_ALL_SDL, test "$SDL_ok" = yes && test "$SDLIMAGE_ok" = yes)
AM_CONDITIONAL(HAVE_TINYXML, test "$TINYXML_ok" = yes)
AM_CONDITIONAL(HAVE_CRYPTOPP, test "$CRYPTOPP_ok" = yes || test "$PPCRYPTO_ok" = yes)

#
# Check for library functions

#
# Create Makefiles
AC_CONFIG_FILES(Makefile                      \
                src/Makefile                  \
                src/compiler/Makefile         \
                src/compiler/tinyxml/Makefile \
                src/example/Makefile          \
                src/lib/Makefile              \
                src/pkgconfig/liblrc.pc       \
                src/strategies/Makefile       \
                man/Makefile                  \
                doc/Makefile)
AC_OUTPUT
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.