diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 190 |
1 files changed, 190 insertions, 0 deletions
diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..dfb9ba1 --- /dev/null +++ b/configure.in @@ -0,0 +1,190 @@ +dnl +dnl Configure.in for Ibtk package +dnl +dnl Additional notes. +dnl ########################################################################### +dnl # IMPORTANT: +dnl # libibtk is builded as static by default for now. See AM_DISABLE_SHARED +dnl ########################################################################### +dnl # next ? +dnl ########################################################################### +dnl Copyright (C) 1999 Steaphan Greene, Øyvind Aabling, Octavian Purdila, +dnl Vladimir Dergachev and Christian Lupien. +dnl +dnl This program 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 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program 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 this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +dnl +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a configuration +dnl script generated by Autoconf, you may include it under the same +dnl distribution terms that you use for the rest of that program. +dnl +dnl + +AC_INIT(src/main.cpp) + +dnl +dnl Required Autoconf Version 2.13 +dnl +AC_PREREQ(2.13) + +dnl +dnl Define IBTK version(s) +dnl +IBTK_MAJOR_VERSION=0 +IBTK_MINOR_VERSION=0 +IBTK_SUB_VERSION=14 +dnl Set to 0 if it's not a pre-version, *never* comment line bellow. +IBTK_PRE_VERSION=0 +dnl +dnl Is this a CVS source tree ? +dnl (must be set to true/false) +dnl +CVS_VERSION=false + +if test "$CVS_VERSION" = "true"; then + IBTK_CVS_VERSION="-CVS-`cat CVSVERSION`" + SPEC_CVS_VERSION="CVS.`cat CVSVERSION`" +else + SPEC_CVS_VERSION="Release" +fi + +if test $IBTK_PRE_VERSION != 0; then +IBTK_VERSION=$IBTK_MAJOR_VERSION.$IBTK_MINOR_VERSION.$IBTK_SUB_VERSION-pre$IBTK_PRE_VERSION +IBTK_FULL_VERSION=$IBTK_MAJOR_VERSION.$IBTK_MINOR_VERSION.$IBTK_SUB_VERSION-pre$IBTK_PRE_VERSION$IBTK_CVS_VERSION +SPEC_VERSION=$IBTK_MAJOR_VERSION.$IBTK_MINOR_VERSION.$IBTK_SUB_VERSION"pre"$IBTK_PRE_VERSION +else +IBTK_VERSION=$IBTK_MAJOR_VERSION.$IBTK_MINOR_VERSION.$IBTK_SUB_VERSION +IBTK_FULL_VERSION=$IBTK_MAJOR_VERSION.$IBTK_MINOR_VERSION.$IBTK_SUB_VERSION$IBTK_CVS_VERSION +SPEC_VERSION=$IBTK_VERSION +fi + +TAR_NAME="ibtk-"$IBTK_FULL_VERSION +VERSION=$IBTK_FULL_VERSION +PACKAGE=ibtk + +AC_SUBST(IBTK_MAJOR_VERSION) +AC_SUBST(IBTK_MINOR_VERSION) +AC_SUBST(IBTK_SUB_VERSION) +AC_SUBST(IBTK_PRE_VERSION) +AC_SUBST(IBTK_VERSION) +AC_SUBST(IBTK_FULL_VERSION) +AC_SUBST(SPEC_VERSION) +AC_SUBST(SPEC_CVS_VERSION) +AC_SUBST(TAR_NAME) +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") +AC_DEFINE_UNQUOTED(VERSION, "$VERSION") +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) + + +AM_INIT_AUTOMAKE($PACKAGE,$VERSION) +AM_MAINTAINER_MODE dnl comment this for release version +AM_CONFIG_HEADER(config.h) + + + +dnl +dnl Checks for programs. +dnl +AC_ISC_POSIX +AC_PROG_CXX +AC_STDC_HEADERS +AC_PROG_MAKE_SET +AC_PROG_INSTALL +AC_PROG_RANLIB +AC_PROG_LN_S + + +dnl +dnl Libtool +dnl +AC_LIBTOOL_DLOPEN +AM_DISABLE_SHARED dnl Comment this for build shared *not yet functionnal* +AM_PROG_LIBTOOL +AC_SUBST(LIBTOOL_DEPS) +if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then + STATIC=-static +else + STATIC= +fi +AC_SUBST(STATIC) + + + +dnl +dnl Checks for typedefs, structures, and compiler characteristics. +dnl +AC_C_CONST +AC_C_INLINE +AC_TYPE_OFF_T +AC_TYPE_SIZE_T +AM_TYPE_PTRDIFF_T + + + +dnl +dnl Checks for X stuff +dnl +AC_PATH_X +AC_PATH_XTRA +if test "x$x_includes" = "x"; then + x_includes="/usr/include" +fi +if test "x$no_x" = "xyes"; then + AC_MSG_ERROR([ + *** X libraries or include files not found. Check 'config.log' for + *** more details.]) +fi + +dnl Check for X11 lib +AC_CHECK_LIB(X11, main, have_x11_lib=yes, + have_x11_lib=no, -L$x_libraries) + +if test "$have_x11_lib" = "yes"; then + X_X11_LIB="-lX11" +else + X_X11_LIB="" +fi +AC_SUBST(X_X11_LIB) + + + +dnl +dnl ################################################# +dnl ############### IBTK STUFF ################## +dnl ################################################# +dnl + +dnl NOOP + + +dnl +dnl Output configuration files +dnl +AC_OUTPUT([ +ibtk.spec +Makefile +SlackBuild +docs/Makefile +m4/Makefile +src/Makefile +src/version.h +]) + +dnl +dnl Change attribute. +dnl +chmod +x ./SlackBuild |