-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
134 lines (112 loc) · 3.62 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
# -*- Autoconf -*-
#
# Copyright (c) Members of the EGEE Collaboration. 2006-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.
#
##
# VERSION number
AC_INIT([argus-pep-api-c], [2.3.1], [[email protected]])
##
AC_CONFIG_AUX_DIR([project])
# ACLOCAL_AMFLAGS = -I <dir> required in your top-level Makefile.am
#AC_CONFIG_MACRO_DIR([project])
# OSX requires ./configure --disable-dependency-tracking to compile, others don't care
AM_INIT_AUTOMAKE([no-dependencies])
# disable static library
AM_DISABLE_STATIC
#
# check for options
#
AC_MSG_CHECKING([whether to package header files and doc])
AC_ARG_ENABLE([devel],
[AS_HELP_STRING([--disable-devel],
[create a package without the header files and doc])],
[enable_devel=no],
[enable_devel=yes])
AM_CONDITIONAL([ENABLE_DEVEL], [test "x$enable_devel" == xyes])
AC_MSG_RESULT([$enable_devel])
AC_MSG_CHECKING([whether to package the shared library])
AC_ARG_ENABLE([library],
[AS_HELP_STRING([--disable-library],
[create a package without the shared library])],
[enable_library=no],
[enable_library=yes])
AM_CONDITIONAL([ENABLE_LIBRARY], [test "x$enable_library" == xyes])
AC_MSG_RESULT([$enable_library])
# RHEL6/SL6 use libcurl with NSS, not OpenSSL!!!
#AC_MSG_CHECKING([whether libcurl uses NSS])
#AC_ARG_WITH([libcurl-nss],
# [AS_HELP_STRING([--with-libcurl-nss],[assume libcurl is compiled with NSS [default=libcurl-openssl]])],
# [],
# [with_libcurl_nss=no])
#
#AS_IF([test "x$with_libcurl_nss" != xno],
# [AC_DEFINE([HAVE_LIBCURL_NSS],[1],[Define to 1 if libcurl is compiled with NSS, not OpenSSL])])
#AC_MSG_RESULT([$with_libcurl_nss])
# Checks for programs.
AM_PROG_MKDIR_P
AC_PROG_LIBTOOL
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LN_S
# Check for doxygen
AC_CHECK_PROG(DOXYGEN,[doxygen],[doxygen],[$ac_aux_dir/missing --run doxygen])
AC_SUBST(DOXYGEN)
# GCC CFLAGS
if test "$GCC" = "yes"; then
# pedantic ANSI C flags
CFLAGS="$CFLAGS -Wall -ansi -pedantic -std=c99"
fi
AC_MSG_NOTICE([libdir for $host: $libdir])
#
# use pkg-config tool for libcurl
#
# export PKG_CONFIG_PATH=...
#
AC_MSG_NOTICE([PKG_CONFIG_PATH=$PKG_CONFIG_PATH])
PKG_CHECK_MODULES(
LIBCURL, [libcurl],
[
AC_MSG_NOTICE([LIBCURL_CFLAGS=$LIBCURL_CFLAGS])
AC_MSG_NOTICE([LIBCURL_LIBS=$LIBCURL_LIBS])
],
[
# Checks for curl headers and library
# will automatically add -lcurl in LDFLAGS
AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR(can not find libcurl header curl/curl.h)])
AC_CHECK_LIB(curl,curl_easy_init)
]
)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h stdlib.h stdio.h stdint.h stdarg.h float.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library and functions.
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strerror strrchr calloc])
#AC_PREFIX_DEFAULT([/opt/emi])
AM_CONFIG_HEADER([src/config.h])
AC_CONFIG_FILES([
libargus-pep.pc
Makefile
src/Makefile
src/util/Makefile
src/hessian/Makefile
src/argus/Makefile
])
AC_OUTPUT