1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
|
# Configuration for ghemical.
# Copyright (c) 2000- Geoff Hutchison, Michael Banck, Tommi Hassinen.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# Process this file with aclocal/autoconf to produce a configure script.
AC_INIT(ghemical, 2.10)
AC_DEFINE([APPVERSION], ["2.10"], [This is the version of ghemical to be built--it is set in the configure.ac])
AC_SUBST(APPVERSION, "2.10")
AC_DEFINE([APPRELEASEDATE], ["2006-08-07"], [This is the releasedate of ghemical--it is set in the configure.ac])
AC_SUBST(APPRELEASEDATE, "2006-08-07")
AC_PREREQ(2.48)
AC_CONFIG_SRCDIR(src/main.cpp)
AM_CONFIG_HEADER(src/ghemicalconfig.h)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_CANONICAL_HOST
top_builddir_=`pwd`
AC_SUBST(top_builddir_)
AC_DEFINE_DIR([APPDATA_PATH], [datadir/ghemical], [Where the data files are ; set in the configure.ac])
# create a version of config.h where the PACKAGE definitions are stripped away.
AC_CONFIG_COMMANDS([src/ghemicalconfig2.h],[cat src/ghemicalconfig.h | grep -v PACKAGE > src/ghemicalconfig2.h])
# Get any build/host and enable/disable flags now.
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# if a mingw32 host is specified, then build code that links against native (MS) runtime libs.
case $host in
*-*-mingw32*)
CPPFLAGS="-Dmno-cygwin -Dmms_bitfields $CPPFLAGS"
LIBS="$LIBS -mwindows"
;;
esac
AC_ARG_ENABLE(threads,[ --enable-threads compile into a multithreaded app], WITH_THREADS="$enableval", WITH_THREADS="yes")
AC_ARG_ENABLE(bonobo,[ --enable-bonobo compile into a bonobo2 server], WITH_BONOBO="$enableval", WITH_BONOBO="no")
AC_ARG_ENABLE(openbabel,[ --enable-openbabel compile with OpenBabel support],WITH_OPENBABEL="$enableval",WITH_OPENBABEL="no")
AC_ARG_ENABLE(shortcuts,[ --enable-shortcuts compile with shortcuts toolbar],WITH_SHORTCUTS="$enableval",WITH_SHORTCUTS="no")
AC_ARG_ENABLE(gamess,[ --enable-gamess compile with GAMESS extensions],WITH_GAMESS="$enableval",WITH_GAMESS="no")
# Checks for programs.
# ^^^^^^^^^^^^^^^^^^^^
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_LIBTOOL
##AC_PROG_RANLIB
AC_PATH_PROG(AR, ar, ar)
AC_PATH_PROG(SHELL, sh, /bin/sh)
AC_PROG_MAKE_SET
AM_SANITY_CHECK
# Checks for libraries.
# ^^^^^^^^^^^^^^^^^^^^^
# gtk+ feature GtkUIManager is needed -> v2.4 or newer is required.
# glib feature GOptionContext is needed -> v2.6 or newer is required.
AC_CHECK_LIB([m], [acos])
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6.0)
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
PKG_CHECK_MODULES(GTKGLEXT, gtkglext-1.0 >= 1.0.5)
CPPFLAGS="$CPPFLAGS $GTKGLEXT_CFLAGS"
LIBS="$LIBS $GTKGLEXT_LIBS"
PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0)
CPPFLAGS="$CPPFLAGS $LIBGLADE_CFLAGS"
LIBS="$LIBS $LIBGLADE_LIBS"
if test $WITH_THREADS = yes; then
AC_DEFINE([ENABLE_THREADS], [], [Define if you are building a multithreaded app])
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.6.0)
CPPFLAGS="$CPPFLAGS $GTHREAD_CFLAGS"
LIBS="$LIBS $GTHREAD_LIBS"
fi
if test $WITH_BONOBO = yes; then
AC_DEFINE([ENABLE_BONOBO], [], [Define if you are building a bonobo2 server version])
## todo ; include the cflags/libs...
fi
if test $WITH_OPENBABEL = yes; then
AC_DEFINE([ENABLE_OPENBABEL], [], [Define if you are building a version that interfaces directly with OpenBabel])
PKG_CHECK_MODULES(OPENBABEL, openbabel-2.0)
AC_SUBST(OPENBABEL_CFLAGS)
AC_SUBST(OPENBABEL_LIBS)
# obs! here we get CFLAGS but set it in CPPFLAGS.
CPPFLAGS="$CPPFLAGS $OPENBABEL_CFLAGS"
LIBS="$LIBS $OPENBABEL_LIBS"
fi
PKG_CHECK_MODULES(LIBGHEMICAL, libghemical >= 2.10)
CPPFLAGS="$CPPFLAGS $LIBGHEMICAL_CFLAGS"
LIBS="$LIBS $LIBGHEMICAL_LIBS"
## enabling shortcuts bar
if test $WITH_SHORTCUTS = yes; then
AC_DEFINE([ENABLE_SHORTCUTS], [], [Define extra shortcut bar])
fi
if test $WITH_GAMESS = yes; then
AC_DEFINE([ENABLE_GAMESS], [], [Define if you want gamess extras])
fi
## todo ; any checks missing here???
AC_CHECK_LIB([GL], [glMatrixMode])
AC_CHECK_LIB([GLU], [main])
AC_CHECK_LIB([glut], [glutInit])
AC_CHECK_LIB([X11], [main])
AC_CHECK_LIB([Xmu], [main])
AC_CHECK_LIB([Xext], [main])
AC_CHECK_LIB([Xi], [main])
# Checks for header files.
# ^^^^^^^^^^^^^^^^^^^^^^^^
AC_CHECK_HEADERS(GL/glut.h)
# Checks for typedefs, structures, and compiler characteristics.
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AC_PROG_CC_STDC
AC_C_CONST
AC_C_INLINE
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)
# Checks for library functions.
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AC_HEADER_STDC
AC_OUTPUT([Makefile
docs/Makefile
docs/user-docs/Makefile
docs/user-docs/images/Makefile
examples/Makefile
examples/TSS/Makefile
examples/TSS/carbocation_rearrangement_hydride_shift/Makefile
examples/TSS/carbocation_rearrangement_methide_shift/Makefile
examples/TSS/cycloaddition_Diels-Alder/Makefile
examples/TSS/E2-reaction/Makefile
examples/TSS/sigmatropic_rearrangement_Cope/Makefile
examples/TSS/SN2-reaction/Makefile
examples/TSS/tautomeric_shift_keto_enol/Makefile
src/pixmaps/Makefile
src/Makefile])
echo
echo build options:
echo ^^^^^^^^^^^^^^
echo enable threads : $WITH_THREADS
echo enable bonobo : $WITH_BONOBO
echo enable OpenBabel : $WITH_OPENBABEL
echo enable GAMESS : $WITH_GAMESS
echo enable shortcuts : $WITH_SHORTCUTS
echo
echo timestamp > stamp.h
|