Commit | Line | Data |
---|---|---|
1420868b OS |
1 | From: =?utf-8?q?Ond=C5=99ej_Sur=C3=BD?= <ondrej@sury.org> |
2 | Date: Mon, 8 Feb 2016 15:09:24 +0100 | |
3 | Subject: Rip AC_PROG_SYSCONFTOOL macro to m4/ directory | |
4 | ||
5 | --- | |
6 | Makefile.am | 2 ++ | |
7 | configure.ac | 2 ++ | |
8 | m4/sysconftool.m4 | 37 +++++++++++++++++++++++++++++++++++++ | |
9 | 3 files changed, 41 insertions(+) | |
10 | create mode 100644 m4/sysconftool.m4 | |
11 | ||
12 | diff --git a/Makefile.am b/Makefile.am | |
13 | index bfa3981..f39338a 100644 | |
14 | --- a/Makefile.am | |
15 | +++ b/Makefile.am | |
16 | @@ -2,6 +2,8 @@ | |
17 | # Copyright 1998 - 2009 Double Precision, Inc. See COPYING for | |
18 | # distribution information. | |
19 | ||
20 | +ACLOCAL_AMFLAGS = -I m4 | |
21 | + | |
22 | AUTOMAKE_OPTIONS=dist-bzip2 | |
23 | ||
24 | SUBDIRS=libs/gdbmobj libs/bdbobj libs/md5 libs/sha1 libs/libhmac libs/numlib libs/makedat userdb libs/rfc822 libs/random128 libs/liblock liblog | |
25 | diff --git a/configure.ac b/configure.ac | |
26 | index 54dbbc6..7450d5f 100644 | |
27 | --- a/configure.ac | |
28 | +++ b/configure.ac | |
29 | @@ -9,6 +9,8 @@ AC_INIT([courier-authlib],[0.66.4],[courier-users@lists.sourceforge.net]) | |
30 | ||
31 | AC_CONFIG_SRCDIR([courierauth.h]) | |
32 | ||
33 | +AC_CONFIG_MACRO_DIR([m4]) | |
34 | + | |
35 | AM_INIT_AUTOMAKE | |
36 | AC_CONFIG_HEADERS([courier_auth_config.h]) | |
37 | >confdefs.h # Kill PACKAGE_ macros | |
38 | diff --git a/m4/sysconftool.m4 b/m4/sysconftool.m4 | |
39 | new file mode 100644 | |
40 | index 0000000..5e21e7b | |
41 | --- /dev/null | |
42 | +++ b/m4/sysconftool.m4 | |
43 | @@ -0,0 +1,37 @@ | |
44 | +# Configure sysconftool | |
45 | +# Copyright 2000-2005 Double Precision, Inc. See COPYING for | |
46 | +# distribution information. | |
47 | +# | |
48 | +# AC_PROG_SYSCONFTOOL | |
49 | + | |
50 | +AC_DEFUN([AC_PROG_SYSCONFTOOL], | |
51 | +[ | |
52 | + | |
53 | + AC_PATH_PROGS(SYSCONFTOOL_PERL, perl5 perl, perl) | |
54 | + | |
55 | + if test "$SYSCONFTOOL_PERL" = "perl" | |
56 | + then | |
57 | + AC_ERROR(perl not found - please install perl) | |
58 | + fi | |
59 | + | |
60 | + AC_MSG_CHECKING(for sysconftool...) | |
61 | + SYSCONFTOOL="" | |
62 | + for sysconf_dir in $ac_aux_dir . .. ../.. | |
63 | + do | |
64 | + if test -f $srcdir/$sysconf_dir/sysconftool | |
65 | + then | |
66 | + SYSCONFTOOL=$srcdir/$sysconf_dir/sysconftool | |
67 | + break | |
68 | + fi | |
69 | + done | |
70 | + | |
71 | + if test "$SYSCONFTOOL" = "" | |
72 | + then | |
73 | + AC_ERROR(sysconftool missing - not in the package) | |
74 | + fi | |
75 | + | |
76 | + AC_MSG_RESULT( $SYSCONFTOOL) | |
77 | + SYSCONFTOOL="$SYSCONFTOOL_PERL $SYSCONFTOOL" | |
78 | + AC_SUBST(SYSCONFTOOL) | |
79 | +] | |
80 | +) |