[go: up one dir, main page]

File: configure.ac

package info (click to toggle)
lcas 1.3.20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,356 kB
  • sloc: sh: 4,371; ansic: 2,820; makefile: 192
file content (213 lines) | stat: -rw-r--r-- 6,179 bytes parent folder | download
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#
# Copyright (c) Members of the EGEE Collaboration. 2004-2010.
# See http://www.eu-egee.org/partners/ for details on the copyright
# holders.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Authors:
# 2009-
#    Oscar Koeroo <okoeroo@nikhef.nl>
#    Mischa Sall\'e <msalle@nikhef.nl>
#    David Groep <davidg@nikhef.nl>
#    NIKHEF Amsterdam, the Netherlands
#    <grid-mw-security@nikhef.nl> 
#
# 2007-2009
#    Oscar Koeroo <okoeroo@nikhef.nl>
#    David Groep <davidg@nikhef.nl>
#    NIKHEF Amsterdam, the Netherlands
#
# 2003-2007
#    Martijn Steenbakkers <martijn@nikhef.nl>
#    Oscar Koeroo <okoeroo@nikhef.nl>
#    David Groep <davidg@nikhef.nl>
#    NIKHEF Amsterdam, the Netherlands
#
                                                                                                                                                          
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.71])
AC_INIT([LCAS],[1.3.20])
AC_CONFIG_MACRO_DIR([project])
AM_INIT_AUTOMAKE([1.6.3 subdir-objects foreign])
AC_CONFIG_SRCDIR([src/lcas_config.h.in])

# Notices.
AC_COPYRIGHT([Copyright (c) 2009 The EU EGEE Project
See LICENCE file for details
])
AC_REVISION([$Revision: 2.32 $])

#Environment.
WORKDIR=`pwd`
AC_SUBST(WORKDIR)

DISTBIN=$WORKDIR/../../dist
AC_SUBST(DISTBIN)

# Checks for programs.
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT
AM_PROG_CC_C_O
AC_PROG_INSTALL

# Checks for libraries.
# dlopen library
AC_CHECK_LIB([dl], [dlopen])

AC_CHECK_LIB([crypto], [X509_free])

# Checks for header files.
AC_HEADER_DIRENT
m4_warn([obsolete],
[The preprocessor macro `STDC_HEADERS' is obsolete.
  Except in unusual embedded environments, you can safely include all
  ISO C90 headers unconditionally.])dnl
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change.  They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP

AC_CHECK_HEADERS([dlfcn.h malloc.h stdlib.h string.h syslog.h unistd.h utime.h values.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_STRUCT_TM

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS([setenv strchr strcspn strdup strerror strncasecmp strpbrk strspn strstr strtol utime])


# Building headers mode
enable_build_headers_default=no
AC_MSG_CHECKING([whether to enable building header files])
AC_ARG_ENABLE([headers], [AS_HELP_STRING([--enable-headers],[build headers])],
[
    AC_MSG_RESULT(yes)
    enable_build_headers="yes"
],[
    AC_MSG_RESULT($enable_build_headers_default)
    enable_build_headers=$enable_build_headers_default
]
)

# Building GLOBUS mode
enable_gsi_mode_default=yes
AC_ARG_ENABLE([gsi-mode],
    [AS_HELP_STRING([--enable-gsi-mode],[create lcas flavour that provides a GSI interface (default)])],
    [enable_gsi_mode=$enableval],
    [enable_gsi_mode=$enable_gsi_mode_default])

# When building headers only
AM_CONDITIONAL([ENABLE_HEADERS], [test "x$enable_build_headers" = "xyes"])
AS_IF([test "x$enable_build_headers" = "xyes"], [
    AC_MSG_NOTICE("building headers")

    LCAS_FLAVOUR=""
    LCAS_FLAVOUR_NAME=""

    AC_DEFINE(ENABLE_HEADERS, 1,[Building headers exclusively enabled])
], [
    # Configuration items

    AC_CONFIG_FILES([src/Makefile])
    AC_CONFIG_FILES([examples/Makefile])

    AC_CONFIG_FILES([config/Makefile])

    AC_DEFINE(ENABLE_HEADERS, 0,[Building headers exclusively disabled])
    
    if test x$enable_gsi_mode = xyes ; then
	LCAS_FLAVOUR=""
	LCAS_FLAVOUR_NAME=""

	AC_MSG_RESULT([Creating GSI flavour of LCAS])

	# Check globus modules
	AC_GLOBUS([COMMON],[],AC_MSG_FAILURE(["no globus-common found"]))
	AC_GLOBUS([GSI_CREDENTIAL],[],AC_MSG_FAILURE(["no globus-gsi-credential found"]))
	AC_GLOBUS([GSSAPI_GSI],[],AC_MSG_FAILURE(["no globus-gssapi-gsi found"]))

	AC_CONFIG_FILES([src/lcas.pc])
    else
	LCAS_FLAVOUR="_without_gsi"
	LCAS_FLAVOUR_NAME="-without-gsi"
	
	AC_DEFINE(NOGLOBUS, 1, "When defined build the globus-less version, i.e. without GSI")

	PACKAGE="$PACKAGE-without-gsi"
	AC_MSG_RESULT([Setting package name to $PACKAGE])
	AC_SUBST(PACKAGE)

	PACKAGE_TARNAME="$PACKAGE_TARNAME-without-gsi"
	AC_MSG_RESULT([setting package tarname $PACKAGE_TARNAME])
	AC_SUBST(PACKAGE_TARNAME)

	AC_MSG_RESULT([Creating GSI-free flavour of LCAS])
	
	AC_CONFIG_FILES([src/lcas-without-gsi.pc])
    fi

])

AM_CONDITIONAL(NOGLOBUS, test x$enable_gsi_mode = xno)

AC_SUBST(LCAS_FLAVOUR)
AC_SUBST(LCAS_FLAVOUR_NAME)

ADD_THESE_DEFINES="-D ALLOW_EMPTY_CREDENTIALS -D DEBUG_LEVEL=0"


# Defines to be added for cpp (will change)
AC_SUBST(ADD_THESE_DEFINES)

# Set default directories
AC_SUBST([LCAS_ETC_HOME], [${sysconfdir}/lcas])
AC_SUBST([LCAS_LIB_HOME], [$libdir])

dnl allow the setting of a different path for the LCAS plug-ins
dnl Makefiles should set the plugindir to $MODULEDIR.
AC_ARG_WITH([lcas_moduledir],
    [AS_HELP_STRING([--with-lcas-moduledir=DIR],
                    [Specify the default install location of the LCAS plug-ins, when relative: prefix with LIBDIR [default=LIBDIR/lcas]])],
    [AS_IF([test "x`echo $withval|cut -c1`" = "x/" ],
    [AC_SUBST([LCAS_MOD_HOME], [$withval])], dnl Absolute path
    [AC_SUBST([LCAS_MOD_HOME], [$LCAS_LIB_HOME/$withval])])
    ],
    [AC_SUBST([LCAS_MOD_HOME], [$LCAS_LIB_HOME/lcas])]
)
AC_MSG_RESULT([LCAS_MOD_HOME set to $LCAS_MOD_HOME])




# Configuration items
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([interface/Makefile])
AC_CONFIG_FILES([interface/lcas-interface.pc])

AC_CONFIG_HEADERS([src/lcas_config.h])

AC_OUTPUT