dnl dnl dnl ProLinga-Calc dnl dnl Copyright (C) 2002-2009 Xobas Software dnl All rights reserved. dnl dnl This file is part of ProLinga-Calc. dnl dnl ProLinga-Calc is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl ProLinga-Calc is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with ProLinga-Calc. If not, see . dnl dnl More information is available at the following addresses: dnl dnl Website : http://www.prolinga.org dnl dnl Email : prolinga-list@prolinga.org dnl dnl dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(ProLinga-Calc,0.0.2,prolinga-list@prolinga.org,prolinga-calc) AC_CONFIG_SRCDIR(src/CalcMain.cpp) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR([m4]) dnl Check for CPU / Vendor / OS AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET AC_LANG(C++) AM_CONFIG_HEADER(src/config.h:src/config-h.in) AM_INIT_AUTOMAKE #AM_INIT_AUTOMAKE(prolingacalc, 0.0.4) dnl Check for gtk-doc dnl GTK_DOC_CHECK(1.0) dnl Set default pkg search path PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" dnl Enable debugging mode AC_ARG_ENABLE(debug, [ --enable-debug Enable debug messages], CFLAGS="$CFLAGS -DDEBUG -O0 -g" CXXFLAGS="$CFLAGS -DDEBUG -O0 -g") dnl Enable profiling with gprof AC_ARG_ENABLE(gprof, [ --enable-gprof Enable profiling with gprof], CFLAGS="$CFLAGS -pg" CXXFLAGS="$CFLAGS -pg" LDFLAGS="$LDFLAGS -pg" ) dnl Enable stripped and optimized release builds AC_ARG_ENABLE(final, [ --enable-final Build release executables (GCC only)], if test "x$GCC" != xyes; then CFLAGS="$CFLAGS -DNDEBUG -Os -s -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS" CXXFLAGS="$CXXFLAGS -DNDEBUG -Os -s -fno-exceptions -fno-check-new -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS" fi) dnl Enable compiler warnings AC_ARG_ENABLE(warnings, [ --enable-warnings Enable compiler warnings (GCC only)], if test "x$GCC" != xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wpointer-arith" CXXFLAGS="$CXXFLAGS -Wall -Wparentheses -Wpointer-arith" fi) dnl By default build static and no shared libs AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(yes) dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_INSTALL dnl AC_PROG_RANLIB dnl cygwin dlls do not accept undefined links case "$host_os" in *cygwin) LDFLAGS="-no-undefined $LDFLAGS" AC_LIBTOOL_WIN32_DLL ;; esac AC_PROG_LIBTOOL dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(string.h math.h ctype.h) dnl Checks for typedefs, structures and compiler characteristics. AC_CHECK_TYPES(bool) AC_HEADER_STDBOOL AC_C_INLINE dnl Checks for library functions. AC_CHECK_FUNCS(pow,,AC_CHECK_LIB(m,pow)) AC_CHECK_FUNCS(sqrt,,AC_CHECK_LIB(m,sqrt)) AC_OUTPUT(Makefile prolinga-calc.pc src/Makefile prolinga/Makefile tests/Makefile doc/Makefile doc/version.txt)