Codebase list cyrus-sasl2 / 603af79
Fix autoreconf by adding some recommended options to configure.in and Makefile.am Ondřej Surý 12 years ago
2 changed file(s) with 90 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 --- a/configure.in
1 +++ b/configure.in
2 @@ -44,6 +44,8 @@ dnl
3 AC_INIT(lib/saslint.h)
4 AC_PREREQ([2.54])
5
6 +AC_CONFIG_MACRO_DIR([cmulocal] [config])
7 +
8 dnl use ./config.cache as the default cache file.
9 dnl we require a cache file to successfully configure our build.
10 if test $cache_file = "/dev/null"; then
11 --- a/Makefile.am
12 +++ b/Makefile.am
13 @@ -43,6 +43,8 @@ AUTOMAKE_OPTIONS = 1.7
14 #
15 ################################################################
16
17 +ACLOCAL_AMFLAGS = -I cmulocal -I config
18 +
19 if SASLAUTHD
20 SAD = saslauthd
21 else
22 --- a/saslauthd/configure.in
23 +++ b/saslauthd/configure.in
24 @@ -1,7 +1,8 @@
25 AC_INIT(mechanisms.h)
26 AC_PREREQ([2.54])
27
28 -AC_CONFIG_AUX_DIR(config)
29 +AC_CONFIG_MACRO_DIR([../cmulocal] [../config])
30 +AC_CONFIG_AUX_DIR([config])
31 AC_CANONICAL_HOST
32
33 dnl Should we enable SASLAUTHd at all?
34 @@ -164,30 +165,30 @@ AC_SUBST(LTLIBOBJS)
35
36 dnl Checks for which function macros exist
37 AC_MSG_CHECKING(whether $CC implements __func__)
38 -AC_CACHE_VAL(have_func,
39 +AC_CACHE_VAL(_cv_have_func,
40 [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __func__);],
41 -have_func=yes,
42 -have_func=no)])
43 -AC_MSG_RESULT($have_func)
44 -if test "$have_func" = yes; then
45 +_cv_have_func=yes,
46 +_cv_have_func=no)])
47 +AC_MSG_RESULT($_cv_have_func)
48 +if test "$_cv_have_func" = yes; then
49 AC_DEFINE(HAVE_FUNC,[],[Does the compiler understand __func__])
50 else
51 AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
52 - AC_CACHE_VAL(have_pretty_function,
53 + AC_CACHE_VAL(_cv_have_pretty_function,
54 [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __PRETTY_FUNCTION__);],
55 - have_pretty_function=yes,
56 - have_pretty_function=no)])
57 - AC_MSG_RESULT($have_pretty_function)
58 - if test "$have_pretty_function" = yes; then
59 + _cv_have_pretty_function=yes,
60 + _cv_have_pretty_function=no)])
61 + AC_MSG_RESULT($_cv_have_pretty_function)
62 + if test "$_cv_have_pretty_function" = yes; then
63 AC_DEFINE(HAVE_PRETTY_FUNCTION,[],[Does compiler understand __PRETTY_FUNCTION__])
64 else
65 AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
66 - AC_CACHE_VAL(have_function,
67 + AC_CACHE_VAL(_cv_have_function,
68 [AC_TRY_LINK([#include <stdio.h>],[printf("%s", __FUNCTION__);],
69 - have_function=yes,
70 - have_function=no)])
71 - AC_MSG_RESULT($have_function)
72 - if test "$have_function" = yes; then
73 + _cv_have_function=yes,
74 + _cv_have_function=no)])
75 + AC_MSG_RESULT($_cv_have_function)
76 + if test "$_cv_have_function" = yes; then
77 AC_DEFINE(HAVE_FUNCTION,[],[Does compiler understand __FUNCTION__])
78 fi
79 fi
80 --- a/saslauthd/Makefile.am
81 +++ b/saslauthd/Makefile.am
82 @@ -1,4 +1,6 @@
83 AUTOMAKE_OPTIONS = 1.7
84 +ACLOCAL_AMFLAGS = -I ../cmulocal -I ../config
85 +
86 sbin_PROGRAMS = saslauthd testsaslauthd
87 EXTRA_PROGRAMS = saslcache
88
2121 0025_ld_as_needed.diff
2222 0026_drop_krb5support_dependency.diff
2323 0027_db5_support.diff
24 0028-autotools_fixes.patch