| 1 | # -*- Mode:Autoconf -*- |
|---|
| 2 | |
|---|
| 3 | ########################################################################## |
|---|
| 4 | # # |
|---|
| 5 | # This file is part of AVANGO. # |
|---|
| 6 | # # |
|---|
| 7 | # Copyright 1997 - 2008 Fraunhofer-Gesellschaft zur Foerderung der # |
|---|
| 8 | # angewandten Forschung (FhG), Munich, Germany. # |
|---|
| 9 | # # |
|---|
| 10 | # AVANGO is free software: you can redistribute it and/or modify # |
|---|
| 11 | # it under the terms of the GNU Lesser General Public License as # |
|---|
| 12 | # published by the Free Software Foundation, version 3. # |
|---|
| 13 | # # |
|---|
| 14 | # AVANGO is distributed in the hope that it will be useful, # |
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # |
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
|---|
| 17 | # GNU General Public License for more details. # |
|---|
| 18 | # # |
|---|
| 19 | # You should have received a copy of the GNU Lesser General Public # |
|---|
| 20 | # License along with AVANGO. If not, see <http://www.gnu.org/licenses/>. # |
|---|
| 21 | # # |
|---|
| 22 | ########################################################################## |
|---|
| 23 | |
|---|
| 24 | # Init |
|---|
| 25 | |
|---|
| 26 | AC_PREREQ(2.59) |
|---|
| 27 | AC_INIT(avango-ensemble, 1.90.1) |
|---|
| 28 | AC_CONFIG_SRCDIR([bootstrap]) |
|---|
| 29 | AC_CONFIG_AUX_DIR([config]) |
|---|
| 30 | AC_CONFIG_HEADERS([config/config.h]) |
|---|
| 31 | AC_CANONICAL_TARGET |
|---|
| 32 | AC_LANG_CPLUSPLUS |
|---|
| 33 | AC_DISABLE_STATIC |
|---|
| 34 | |
|---|
| 35 | AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability]) |
|---|
| 36 | |
|---|
| 37 | # Versioning |
|---|
| 38 | |
|---|
| 39 | AVANGO_ENSEMBLE_VERSION=AC_PACKAGE_VERSION |
|---|
| 40 | AVANGO_ENSEMBLE_VERSION_MAJOR=`echo ${AVANGO_ENSEMBLE_VERSION} | cut -d'.' -f1` |
|---|
| 41 | AVANGO_ENSEMBLE_VERSION_MINOR=`echo ${AVANGO_ENSEMBLE_VERSION} | cut -d'.' -f2` |
|---|
| 42 | AVANGO_ENSEMBLE_VERSION_MAINT=`echo ${AVANGO_ENSEMBLE_VERSION} | cut -d'.' -f3` |
|---|
| 43 | AC_SUBST(AVANGO_ENSEMBLE_VERSION) |
|---|
| 44 | AC_SUBST(AVANGO_ENSEMBLE_VERSION_MAJOR) |
|---|
| 45 | AC_SUBST(AVANGO_ENSEMBLE_VERSION_MINOR) |
|---|
| 46 | AC_SUBST(AVANGO_ENSEMBLE_VERSION_MAINT) |
|---|
| 47 | |
|---|
| 48 | # Build options |
|---|
| 49 | |
|---|
| 50 | AC_ARG_ENABLE(debug, |
|---|
| 51 | AS_HELP_STRING( |
|---|
| 52 | [--enable-debug], |
|---|
| 53 | [enable debug code and compiler flags [[default=no]]]), |
|---|
| 54 | [if test "${enableval}" = "yes"; then |
|---|
| 55 | AVANGO_ENSEMBLE_DEBUG=1 |
|---|
| 56 | else |
|---|
| 57 | AVANGO_ENSEMBLE_DEBUG=0 |
|---|
| 58 | fi |
|---|
| 59 | ],[AVANGO_ENSEMBLE_DEBUG=0]) |
|---|
| 60 | AC_SUBST(AVANGO_ENSEMBLE_DEBUG) |
|---|
| 61 | AM_CONDITIONAL([AVANGO_ENSEMBLE_DEBUG], [test $AVANGO_ENSEMBLE_DEBUG -eq 1]) |
|---|
| 62 | |
|---|
| 63 | # Check platform/compiler support |
|---|
| 64 | |
|---|
| 65 | AC_MSG_RESULT([]) |
|---|
| 66 | |
|---|
| 67 | case "${target}" in |
|---|
| 68 | i?86*-linux-* | i?86*-*-linux | x86_64-*-linux-* ) |
|---|
| 69 | AVANGO_ENSEMBLE_SETUP_LINUX |
|---|
| 70 | ;; |
|---|
| 71 | |
|---|
| 72 | *) |
|---|
| 73 | AC_MSG_ERROR([Sorry, ${target} not a supported platform.]) |
|---|
| 74 | ;; |
|---|
| 75 | esac |
|---|
| 76 | |
|---|
| 77 | # Checks for programs. |
|---|
| 78 | |
|---|
| 79 | AC_PROG_LIBTOOL |
|---|
| 80 | AC_PROG_CXX |
|---|
| 81 | |
|---|
| 82 | # Internal checks |
|---|
| 83 | |
|---|
| 84 | AC_MSG_RESULT([]) |
|---|
| 85 | |
|---|
| 86 | AVANGO_ENSEMBLE_CHECK_COMPILER_VERSION |
|---|
| 87 | AVANGO_ENSEMBLE_SETUP_POST |
|---|
| 88 | |
|---|
| 89 | AVANGO_ENSEMBLE_CHECK_OCAML |
|---|
| 90 | AVANGO_ENSEMBLE_SETUP_ENSEMBLE |
|---|
| 91 | |
|---|
| 92 | # Additional macros |
|---|
| 93 | |
|---|
| 94 | CP="cp -f -p" |
|---|
| 95 | AC_SUBST(CP) |
|---|
| 96 | |
|---|
| 97 | MKDIR="mkdir -p" |
|---|
| 98 | AC_SUBST(MKDIR) |
|---|
| 99 | |
|---|
| 100 | MV="mv -f" |
|---|
| 101 | AC_SUBST(MV) |
|---|
| 102 | |
|---|
| 103 | # allow gnu make conditionals in Makefile.am |
|---|
| 104 | # usage: |
|---|
| 105 | # |
|---|
| 106 | # @MK@ifeq(...) |
|---|
| 107 | # ... |
|---|
| 108 | # @MK@endif |
|---|
| 109 | # |
|---|
| 110 | # don't put automake magic variables (things like |
|---|
| 111 | # foo_SOURCES, foo_LDFLAGS, etc.) inside ifeq/endif, |
|---|
| 112 | # otherwise automake gets confused. |
|---|
| 113 | # |
|---|
| 114 | MK= |
|---|
| 115 | AC_SUBST(MK) |
|---|
| 116 | |
|---|
| 117 | package_version=${PACKAGE_VERSION} |
|---|
| 118 | AC_SUBST(package_version) |
|---|
| 119 | |
|---|
| 120 | # Output |
|---|
| 121 | |
|---|
| 122 | AC_CONFIG_FILES([ |
|---|
| 123 | Makefile \ |
|---|
| 124 | dist/Makefile \ |
|---|
| 125 | dist/pkg-config/avango-ensemble.pc \ |
|---|
| 126 | dist/pkg-config/Makefile \ |
|---|
| 127 | include/Makefile \ |
|---|
| 128 | include/avango/Makefile \ |
|---|
| 129 | include/avango/ensemble/Config.h \ |
|---|
| 130 | include/avango/ensemble/Makefile \ |
|---|
| 131 | include/avango/ensemble/hot/Makefile \ |
|---|
| 132 | include/avango/ensemble/maestro/Makefile \ |
|---|
| 133 | src/Makefile \ |
|---|
| 134 | src/avango/Makefile \ |
|---|
| 135 | src/avango/ensemble/Makefile \ |
|---|
| 136 | src/avango/ensemble/ensemble/Makefile \ |
|---|
| 137 | src/avango/ensemble/ensemble/socket/Makefile \ |
|---|
| 138 | src/avango/ensemble/ensemble/socket/u/Makefile \ |
|---|
| 139 | src/avango/ensemble/ensemble/socket/s/Makefile \ |
|---|
| 140 | src/avango/ensemble/hot/Makefile \ |
|---|
| 141 | src/avango/ensemble/maestro/Makefile \ |
|---|
| 142 | src/avango/ensemble/tests/Makefile \ |
|---|
| 143 | ]) |
|---|
| 144 | AC_OUTPUT |
|---|
| 145 | |
|---|
| 146 | AC_MSG_RESULT([]) |
|---|
| 147 | AC_MSG_RESULT([To start the build process run 'make' in here.]) |
|---|
| 148 | AC_MSG_RESULT([]) |
|---|
| 149 | AC_MSG_RESULT([Configuration for building ${PACKAGE_NAME}-${PACKAGE_VERSION} on ${target} done.]) |
|---|
| 150 | AC_MSG_RESULT([]) |
|---|