File: configure.in

package info (click to toggle)
libuser 1%3A0.56.9.dfsg.1-1.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 6,624 kB
  • sloc: ansic: 15,970; sh: 10,571; xml: 2,060; python: 1,740; yacc: 782; makefile: 275; sed: 16
file content (149 lines) | stat: -rw-r--r-- 4,110 bytes parent folder | download | duplicates (2)
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
AC_INIT([libuser], [0.56.9])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR([lib/user.c])
AC_CONFIG_AUX_DIR([admin])
AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects -Wall])

AC_PROG_CC
AM_PROG_CC_C_O
AC_CHECK_PROG([YACC], [bison -y], [bison -y], [:])
AC_ISC_POSIX

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

PKG_CHECK_MODULES(GLIB,[glib-2.0 gmodule-no-export-2.0])
PKG_CHECK_MODULES(GOBJECT,[glib-2.0 gobject-2.0])
PKG_CHECK_MODULES(GMODULE,[glib-2.0 gmodule-no-export-2.0 gobject-2.0])
AC_DEFINE(G_DISABLE_DEPRECATED,,
	[Stay away from deprecated glib functionality.])

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.14.6])

LIBSAVE="$LIBS"
AC_SEARCH_LIBS([crypt], [crypt])
CRYPT_LIBS="$LIBS"
LIBS="$LIBSAVE"
AC_SUBST(CRYPT_LIBS)

AC_ARG_WITH([popt], AS_HELP_STRING([--with-popt=DIR],
				   [use popt headers and libraries under DIR]),
[if test "x$withval" != x -a "x$withval" != xyes -a "x$withval" != xno -a \
	"x$withval" != x/usr ; then
	CPPFLAGS="$CPPFLAGS -I$popt/include"
	LDFLAGS="$LDFLAGS -L$popt/lib"
fi])

AC_ARG_WITH([ldap],
	    AS_HELP_STRING([--with-ldap=DIR],
			   [use OpenLDAP 2.x headers and libraries under DIR]),
[if test "x$withval" != x -a "x$withval" != xno ; then
	ldap=$withval
else
	ldap=no
fi
],ldap=no)

build_ldap=no
if test x$ldap != xno ; then
	LIBSAVE="$LIBS"
	if test x$ldap != xyes -a x$ldap != x/usr ; then
		CPPFLAGS="$CPPFLAGS -I$ldap/include"
		LDFLAGS="$LDFLAGS -L$ldap/lib"
	fi
	AC_SEARCH_LIBS([ldap_sasl_interactive_bind_s], [ldap])
	AC_CHECK_FUNC(ldap_sasl_interactive_bind_s,[
	AC_CHECK_FUNC(ldap_set_option,[
	AC_CHECK_FUNC(ldap_start_tls_s,[
	AC_CHECK_FUNC(ldap_modify_ext_s,[
	AC_CHECK_FUNC(ldap_delete_ext_s,[
	build_ldap=yes])])])])])
	LIBS="$LIBSAVE"
fi
AM_CONDITIONAL([LDAP], [test $build_ldap = yes])

AC_ARG_WITH([sasl],
	    AS_HELP_STRING([--with-sasl=DIR],
			   [use Cyrus SASL headers and libraries under DIR]),
[if test "x$withval" != x -a "x$withval" != xno ; then
	sasl=$withval
else
	sasl=no
fi
],sasl=no)

build_sasl=no
if test x$sasl != xno ; then
	LIBSAVE="$LIBS"
	if test x$sasl != xyes -a x$sasl != x/usr ; then
		CPPFLAGS="$CPPFLAGS -I$sasl/include"
		LDFLAGS="$LDFLAGS -L$sasl/lib"
	fi
	AC_SEARCH_LIBS([sasl_setpass], [sasl2], [build_sasl=yes])
	AC_CHECK_FUNCS_ONCE([sasl_user_exists])
	LIBS="$LIBSAVE"
fi
AM_CONDITIONAL([SASL], [test $build_sasl = yes])

AC_ARG_WITH([python],
	    AS_HELP_STRING([--with-python],
			   [build Python modules (default is YES)]), [],
	    [with_python=yes])
AM_CONDITIONAL([WITH_PYTHON], [test $with_python != no])
if test $with_python != no ; then
   AM_PATH_PYTHON
fi

AC_ARG_WITH([selinux],
	    AS_HELP_STRING([--with-selinux],
			   [work with SELinux extensions (default is NO)]),
	    [selinux=$withval], [selinux=no])
if test "x$selinux" != xno ; then
    SELINUX_LIBS=-lselinux
    AC_DEFINE([WITH_SELINUX], [1], [Define to 1 to use SELinux extensions])
fi
AC_SUBST(SELINUX_LIBS)

AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T

AC_CHECK_FUNCS_ONCE([__secure_getenv])

# Modify CFLAGS after all tests are run (some of them could fail because
# of the -Werror).
if test "$GCC" = yes ; then
    AC_CACHE_CHECK([for available GCC warning flags],
		   [mitr_cv_prog_gcc_warnings],
    [mitr_cv_prog_gcc_warnings=""
    for i in -Wall -Wcast-align -Wmissing-noreturn -Wnested-externs dnl
-Wpointer-arith -Wstrict-prototypes -Wundef; do
        oldcflags=$CFLAGS
        CFLAGS="$CFLAGS $i"
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
		[mitr_cv_prog_gcc_warnings="$mitr_cv_prog_gcc_warnings $i"])
	CFLAGS=$oldcflags
     done])
     CFLAGS="$CFLAGS $mitr_cv_prog_gcc_warnings"
     AC_MSG_CHECKING([whether we should use -Werror])
     AC_ARG_ENABLE([Werror],
		   AS_HELP_STRING([--enable-Werror],
			[use -Werror if compiling with gcc (default is NO)]),
		   [], enable_Werror=no)
     if test "x$enable_Werror" != xno; then
	CFLAGS="$CFLAGS -Werror"
     fi
     AC_MSG_RESULT([$enable_Werror])
fi

GTK_DOC_CHECK

dnl Does not even compile
AM_CONDITIONAL([KRB5], [false])

AC_CONFIG_FILES([Makefile po/Makefile.in docs/Makefile docs/reference/Makefile
libuser.pc])
AC_OUTPUT