-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
93 lines (83 loc) · 1.77 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
AC_INIT([posix-winsync-plugin],[0.0.1])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([.])
AC_CANONICAL_HOST
AC_PROG_CC
# Checks for header files.
AC_CHECK_HEADERS([string.h strings.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([strncasecmp strtol])
# Determine PIC flag, adjust default CFLAGS
pic_flag=
shared_flag=
AC_MSG_CHECKING(Determining PIC compiler/shared linker flag)
if test "$GCC" = yes; then
AC_MSG_RESULT(-fPIC)
pic_flag=-fPIC
shared_flag=-shared
else
case "$host" in
*-*-hpux*)
AC_MSG_RESULT("+Z")
pic_flag="+Z"
;;
*-*-solaris*)
AC_MSG_RESULT(-Kpic)
pic_flag=-Kpic
shared_flag=-G
;;
*-*-linux*)
AC_MSG_RESULT(-fPIC)
pic_flag=-fPIC
# Any Linux compiler had better be gcc compatible.
;;
*)
echo "Host : $host"
AC_MSG_RESULT("<none>")
;;
esac
fi
AC_SUBST(pic_flag)
AC_SUBST(shared_flag)
# check for --with-nspr-inc
AC_MSG_CHECKING(for --with-nspr-inc)
AC_ARG_WITH(nspr-inc, AS_HELP_STRING([--with-nspr-inc=PATH],[Mozilla Portable Runtime include directory]),
[
if test -e "$withval"/prtypes.h
then
AC_MSG_RESULT([using $withval])
nspr_inc="-I$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
[
AC_MSG_RESULT(no)
nspr_inc=""
])
AC_SUBST([nspr_inc])
# check for --with-ds-inc
AC_MSG_CHECKING(for --with-ds-inc)
AC_ARG_WITH(ds-inc, AS_HELP_STRING([--with-ds-inc=PATH],[Port389 DS include directory]),
[
if test -e "$withval"/slapi-plugin.h
then
AC_MSG_RESULT([using $withval])
ds_inc="-I$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
[
AC_MSG_RESULT(no)
ds_inc=""
])
AC_SUBST([ds_inc])
AC_OUTPUT([
Makefile
])