source: trunk/configure.ac @ 24

Revision 24, 4.5 KB checked in by mmatloka, 14 years ago (diff)

downgrade to 1.0.0 - still dont know why some m4 files are not included in the dist - doing it manually

  • Property svn:keywords set to Id Revision
Line 
1AC_INIT([PSNC DRMAA for LoadLeveler], [1.0.0], [mamonski@man.poznan.pl], [ll_drmaa])
2AC_PREREQ(2.58)
3AC_REVISION([$Id$])
4AC_COPYRIGHT([
5PSNC DRMAA for LoadLeveler
6Copyright (C) 2010 Poznan Supercomputing and Networking Center
7
8Licensed under the Apache License, Version 2.0 (the "License");
9you may not use this file except in compliance with the License.
10You may obtain a copy of the License at
11
12   http://www.apache.org/licenses/LICENSE-2.0
13
14Unless required by applicable law or agreed to in writing, software
15distributed under the License is distributed on an "AS IS" BASIS,
16WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17See the License for the specific language governing permissions and
18limitations under the License.
19])
20
21LL_DRMAA_MAJOR=1
22LL_DRMAA_MINOR=0
23LL_DRMAA_MICRO=0
24LL_DRMAA_VERSION_INFO=1:0:0
25AC_SUBST([LL_DRMAA_MAJOR])
26AC_SUBST([LL_DRMAA_MINOR])
27AC_SUBST([LL_DRMAA_MICRO])
28AC_SUBST([LL_DRMAA_VERSION_INFO])
29
30AC_CONFIG_SRCDIR([ll_drmaa/drmaa.c])
31AC_CONFIG_MACRO_DIR([m4])
32AC_CONFIG_AUX_DIR([scripts])
33
34AM_INIT_AUTOMAKE
35
36# command-line arguments:
37AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
38                        [produce code suiteable for debugging and print logs at runtime]))
39AC_ARG_ENABLE(development, AC_HELP_STRING([--enable-development],
40                        [enable development mode: make additional checks (suitable for PSNC DRMAA for LL developers)]))
41
42# programs:
43AC_PROG_CC
44AC_PROG_CPP
45AC_PROG_RANLIB
46AC_PROG_INSTALL
47AC_PROG_LIBTOOL
48AC_PROG_MAKE_SET
49AC_PROG_LN_S
50
51AX_DOCUTILS()
52if test x$RST2HTML = x; then
53        RST2HTML="sh m4/missing-dev-prog.sh docutils"
54fi
55if test x$RST2LATEX = x; then
56        RST2LATEX="sh m4/missing-dev-prog.sh docutils"
57fi
58
59# check compiler / set basic flags:
60if test x$ac_cv_prog_cc_stdc = xno; then
61        AC_MSG_ERROR([ANSI C compiler is required])
62fi
63
64if test x$GCC = xyes; then
65        CFLAGS="-pedantic  ${CFLAGS}"
66fi
67AM_CONDITIONAL([GCC], [test x$GCC = xyes])
68
69AX_GCC_WARNINGS()
70
71AH_TEMPLATE([DEBUGGING], [Produce debugging code])
72if test x$enable_debug = xyes; then
73        AC_DEFINE(DEBUGGING,[1])
74        CFLAGS="${CFLAGS} -O0"
75else
76        CPPFLAGS="-DNDEBUG ${CPPFLAGS}"
77fi
78
79AH_TEMPLATE([DEVELOPMENT], [Development mode])
80if test x$enable_development = xyes; then
81        AC_DEFINE(DEVELOPMENT, [1])
82fi
83
84AH_BOTTOM([
85#ifndef __GNUC__
86#       define __attribute__ /* nothing */
87#endif
88])
89
90# system:
91CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE ${CPPFLAGS}"
92
93AC_CANONICAL_HOST
94case "$host_os" in
95        *linux*)
96                CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE"
97                ;;
98        *solaris*)
99                CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
100                ;;
101        *freebsd*)
102                ;;
103        *darwin*)
104                CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=400"
105                ;;
106        *aix*)
107                CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED=1 -D__linux__"
108                ;;
109        *)
110                CPPFLAGS="${CPPFLAGS} -D_XOPEN_SOURCE=500"
111                ;;
112esac
113
114# project prerequisites:
115
116# libraries:
117ACX_PTHREAD([CFLAGS="$CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS"],
118                [AC_MSG_ERROR([POSIX threads library is required.])])
119
120AX_LL([:], [AC_MSG_ERROR([
121LL libraries/headers not found;
122add --with-ll-inc and --with-ll-lib with appropriate locations.]) ])
123if ! echo $ac_configure_args | ${EGREP} -q '(--)(exec-)?prefix'; then
124        if test ${sysconfdir} == '${prefix}/etc'; then
125                # do not install configuration in /usr/local/etc
126                sysconfdir='/etc'
127                ac_configure_args="${ac_configure_args} --sysconfdir=${sysconfdir}"
128        fi
129fi
130CPPFLAGS="${CPPFLAGS} -DCONFDIR=${sysconfdir}"
131
132# headers:
133AC_HEADER_STDC
134AC_HEADER_TIME
135AC_HEADER_STDBOOL
136
137AC_CHECK_HEADERS([stddef.h stdlib.h string.h strings.h sys/time.h unistd.h])
138
139# types and structures:
140AC_TYPE_SIZE_T
141AC_STRUCT_TM
142
143# compiler characteristic
144AC_C_CONST
145AC_C_INLINE
146AC_C_VOLATILE
147
148# functions:
149# this cause problem on AIX systems
150#AC_FUNC_MALLOC
151AC_FUNC_STRFTIME
152AC_FUNC_VPRINTF
153AC_CHECK_FUNCS([ \
154        asprintf \
155        fstat \
156        getcwd \
157        gettimeofday \
158        localtime_r \
159        memset \
160        mkstemp \
161        setenv \
162        strcasecmp \
163        strchr \
164        strdup \
165        strerror \
166        strlcpy \
167        strndup \
168        strstr \
169        strtol \
170        vasprintf \
171        ])
172
173# system services:
174
175# turn on warning after all tests
176if test x$GCC = xyes; then
177        if test x$enable_development = xyes; then
178                CFLAGS="-Werror ${CFLAGS}"
179        fi
180        CFLAGS="-Wall -W -Wno-unused-parameter $GCC_W_NO_FORMAT_ZERO_LENGTH ${CFLAGS}"
181fi
182
183#eval bindir
184AH_TEMPLATE([LL_DRMAA_BIN_DIR], [Location of binary files])
185test "$prefix" = NONE && prefix="$ac_default_prefix"
186test "$exec_prefix" = NONE && exec_prefix='${prefix}'
187x="\$bindir"       
188eval y="$x"
189while test "$x" != "$y"; do
190                x="$y"
191                eval y="$x"
192done
193AC_DEFINE_UNQUOTED([LL_DRMAA_BIN_DIR], ["$x"])
194       
195
196AC_CONFIG_FILES([
197        Makefile
198        ll_drmaa/Makefile
199])
200AC_CONFIG_HEADERS([config.h])
201AC_CONFIG_SUBDIRS([drmaa_utils])
202AC_OUTPUT
203
204echo
205echo "Run 'make' now."
206
Note: See TracBrowser for help on using the repository browser.