forked from globus/GridFTP-DSI-for-HPSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
175 lines (156 loc) · 5.63 KB
/
configure.ac
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
dnl
dnl University of Illinois/NCSA Open Source License
dnl
dnl Copyright © 2012-2014, NCSA. All rights reserved.
dnl
dnl Developed by:
dnl
dnl Storage Enabling Technologies (SET)
dnl
dnl Nation Center for Supercomputing Applications (NCSA)
dnl
dnl http://dims.ncsa.uiuc.edu/set/uberftp
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the .Software.),
dnl to deal with the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following conditions:
dnl
dnl + Redistributions of source code must retain the above copyright notice,
dnl this list of conditions and the following disclaimers.
dnl
dnl + Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimers in the
dnl documentation and/or other materials provided with the distribution.
dnl
dnl + Neither the names of SET, NCSA
dnl nor the names of its contributors may be used to endorse or promote
dnl products derived from this Software without specific prior written
dnl permission.
dnl
dnl THE SOFTWARE IS PROVIDED .AS IS., WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dnl THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dnl DEALINGS WITH THE SOFTWARE.
dnl
AC_REVISION($Revision: 1.8 $)
AC_INIT([GridFTP HPSS DSI], [2.0_BETA], [Jason Alt <jalt@ncsa.illinois.edu>])
AM_INIT_AUTOMAKE
AC_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CC
AC_CONFIG_MACRO_DIR([m4])
AC_ARG_ENABLE(quota_support,
AC_HELP_STRING([--enable-quota_support], [mark renamed files for quota support.]),
[
AC_DEFINE(MARK_RENAMED_FILES, 1, [mark renamed files for quota support.])
],
[])
#
# For checksums
#
AC_CHECK_HEADERS([openssl/md5.h], [MD5_HEADER="yes"], [AC_MSG_ERROR(Missing openssl/md5.h)])
#
# Globus Setup
#
AC_ARG_WITH(globus,
[ --with-globus=value location of Globus installation, defaults to /usr],
[ globus_location="$withval" ],
[ globus_location="/usr" ]
)
#
# globus_common.h depends on globus_config.h, so do it first
#
if test "x$globus_location" == "x/usr" ; then
# RPM installation
CPPFLAGS="-I$globus_location/lib64/globus/include -I/usr/include/globus"
AC_CHECK_HEADERS([globus_config.h],
[GLOBUS_CONFIG_CPPFLAGS="$CPPFLAGS"],
[AC_MSG_ERROR(globus_config.h not found, install globus-core)])
else
# Source installation
CPPFLAGS=-I$globus_location/include/globus/gcc64dbg
AC_CHECK_HEADERS([globus_config.h],
[GLOBUS_CONFIG_CPPFLAGS="$CPPFLAGS"],
[AC_MSG_ERROR(globus_config.h not found in $globus_location)])
fi
#
# Now check for globus_common.h using globus_config.h's location
#
CPPFLAGS="-I$globus_location/include/globus $GLOBUS_CONFIG_CPPFLAGS"
AC_CHECK_HEADERS([globus_common.h],
[GLOBUS_COMMON_CPPFLAGS="-I$globus_location/include/globus"],
[AC_MSG_ERROR(globus_common.h not found)])
#
# Sum up all the Globus CPPFLAGS
#
GLOBUS_CPPFLAGS=$GLOBUS_CONFIG_CPPFLAGS
if test "${GLOBUS_CONFIG_CPPFLAGS}" != "${GLOBUS_COMMON_CPPFLAGS}"; then
GLOBUS_CPPFLAGS="$GLOBUS_CPPFLAGS $GLOBUS_COMMON_CPPFLAGS"
fi
#
# Now check for globus_gridftp_server.h
#
CPPFLAGS="${GLOBUS_CPPFLAGS}"
AC_CHECK_HEADERS([globus_gridftp_server.h],
[],
[AC_MSG_ERROR(globus_gridftp_server.h not found)])
AC_SUBST(GLOBUS_CPPFLAGS)
#
# Find the needed Globus libraries
#
LDFLAGS="-L$globus_location/lib64/"
AC_CHECK_LIB([globus_gridftp_server],
[globus_gridftp_server_begin_transfer],
[GLOBUS_LDFLAGS=-L$globus_location/lib64],
[AC_MSG_ERROR(libglobus_gridftp_server.so not found)])
AC_SUBST(GLOBUS_LDFLAGS)
dnl
dnl Find the HPSS installation
dnl
hpss_location=/opt/hpss
AC_ARG_WITH(hpss, AC_HELP_STRING([--with-hpss=dir],\
[location of HPSS installation, defaults to /opt/hpss]),
[hpss_location=$withval],
[])
AC_SUBST(HPSS_LOCATION, $hpss_location)
AC_ARG_ENABLE(ncsa_features,
AC_HELP_STRING([--enable-ncsa_features], [shortcut to enable quota and UDA support.]),
[
AC_DEFINE(MARK_RENAMED_FILES, 1, [mark renamed files for quota support.])
AC_DEFINE(UDA_CHECKSUM_SUPPORT, 1, [Store checksums in UDA.])
],
[])
AC_ARG_ENABLE(quota_support,
AC_HELP_STRING([--enable-quota_support], [mark renamed files for quota support.]),
[
AC_DEFINE(MARK_RENAMED_FILES, 1, [mark renamed files for quota support.])
],
[])
AC_ARG_ENABLE(uda_checksum_support,
AC_HELP_STRING([--enable-uda_checksum_support], [store checksums in UDA.]),
[
AC_DEFINE(UDA_CHECKSUM_SUPPORT, 1, [Store checksums in UDA.])
],
[])
dnl
dnl These values are hardcoded for now, until I can get the packaging stuff working again
dnl
DIRT_TIMESTAMP=`perl -e 'print time'`
DIRT_BRANCH_ID=99999
AC_CONFIG_HEADERS([config.h])
AC_SUBST(GPT_MAJOR_VERSION, 1)
AC_SUBST(GPT_MINOR_VERSION, 1)
AC_SUBST(DIRT_TIMESTAMP)
AC_SUBST(DIRT_BRANCH_ID)
AC_SUBST(REAL_CC, CC)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([loaders/Makefile])
AC_CONFIG_FILES([module/Makefile])
AC_CONFIG_FILES([loaders/version.h])
AC_OUTPUT