This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
113 lines (99 loc) · 2.63 KB
/
configure.in
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
AC_PREREQ([2.53])
AC_INIT(rlm_osp.c)
AC_REVISION($Revision$)
AC_DEFUN(modname,[rlm_osp])
fail=
SMART_LIBS=
SMART_CLFAGS=
if test x$with_[]modname != xno; then
AC_PROG_CC
dnl # extra argument: --with-osptk-includes=dir
osptk_inc_dir=
AC_ARG_WITH(osptk-includes,
[ --with-osptk-includes=DIR Directory to look for OSPToolkit include files],
[ case "$withval" in
*) osptk_inc_dir="$withval"
;;
esac ]
)
dnl # extra argument: --with-osptk-libraries=dir
osptk_lib_dir=
AC_ARG_WITH(osptk-libraries,
[ --with-osptk-libraries=DIR Directory to look for OSPToolkit library files],
[ case "$withval" in
*) osptk_lib_dir="$withval"
;;
esac ]
)
dnl # Check for OpenSSL support
AC_MSG_CHECKING(for OpenSSL support)
if test "x$OPENSSL_LIBS" != "x"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fail="$fail OpenSSL"
fi
dnl # Check for utf8proc libraries
FR_SMART_CHECK_LIB(utf8proc, utf8proc_NFKD)
if test "x$ac_cv_lib_utf8proc_utf8proc_NFKD" != "xyes"; then
fail="$fail libutf8proc"
fi
dnl # Check for OSPToolkit headers
smart_try_dir="$osptk_inc_dir"
FR_SMART_CHECK_INCLUDE(osp/osp.h)
if test "x$ac_cv_header_osp_osp_h" != "xyes"; then
fail="$fail osp/osp.h"
fi
dnl # Check for OSPToolkit libraries
org_LIBS=$LIBS
LIBS="$OPENSSL_LIBS $LIBS"
smart_try_dir="$osptk_lib_dir"
FR_SMART_CHECK_LIB(osptk, OSPPInit)
if test "x$ac_cv_lib_osptk_OSPPInit" != "xyes"; then
fail="$fail libosptk"
fi
LIBS=$org_LIBS
dnl # Check for OSP Toolkit version
AC_MSG_CHECKING(for OSP Toolkit version)
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <osp/osp.h>
#define REQ_VER_MAJOR 4
#define REQ_VER_MINOR 0
#define REQ_VER_BUGFIX 0
int main(void) {
int ver = OSP_CLIENT_TOOLKIT_VERSION_MAJOR * 10000 + OSP_CLIENT_TOOLKIT_VERSION_MINOR * 100 + OSP_CLIENT_TOOLKIT_VERSION_BUGFIX;
int req = REQ_VER_MAJOR * 10000 + REQ_VER_MINOR * 100 + REQ_VER_BUGFIX;
return (ver < req) ? 1 : 0;
}
]])],
[osptk_compatible=yes],
[osptk_compatible=no]
)
if test "$osptk_compatible" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fail="$fail OSP Toolkit version"
fi
targetname=modname
else
targetname=
echo \*\*\* module modname is disabled.
fi
dnl Don't change this section.
if test x"$fail" != x""; then
if test x"${enable_strict_dependencies}" = x"yes"; then
AC_MSG_ERROR([set --without-]modname[ to disable it explicitly.])
else
AC_MSG_WARN([silently not building ]modname[.])
AC_MSG_WARN([FAILURE: ]modname[ requires: $fail.]);
targetname=""
fi
fi
osp_cflags=$SMART_CFLAGS
osp_ldflags=$SMART_LIBS
AC_SUBST(osp_cflags)
AC_SUBST(osp_ldflags)
AC_SUBST(targetname)
AC_OUTPUT(Makefile)