-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
74 lines (64 loc) · 2.6 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
AC_INIT([wikilint], [0.1], [[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign no-dist color-tests parallel-tests silent-rules -Wall])
AC_PROG_INSTALL
# For tests.
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
AX_PROG_PERL_MODULES([CGI DBD::SQLite DBI HTML::Entities LWP::UserAgent MediaWiki::API URI::Escape],
[],
[AC_MSG_ERROR(Perl module requirements unfulfilled)])
# Directories.
AC_ARG_WITH([cgibindir],
AS_HELP_STRING([--with-cgibindir=DIR],
[Install CGI executables in DIR]),
[CGIBINDIR=${withval}],
[CGIBINDIR=${HOME}/public_html/cgi-bin])
AC_ARG_WITH([htdocsdir],
AS_HELP_STRING([--with-htdocsdir=DIR],
[Install HTML files in DIR]),
[HTDOCSDIR=${withval}],
[HTDOCSDIR=${HOME}/public_html/wikilint])
pmdir_relative_path=`\
$PERL -MConfig \
-wle '($_ = $Config{installsitelib})
=~ s!^\Q$Config{siteprefix}/!!; \
print'`
AC_ARG_WITH([pmdir],
AS_HELP_STRING([--with-pmdir=DIR],
[Install Perl modules in DIR]),
[PMDIR=${withval}],
[PMDIR='${prefix}'/"$pmdir_relative_path"])
# Directories.
AC_SUBST([cgibindir], [$CGIBINDIR])
AC_SUBST([htdocsdir], [$HTDOCSDIR])
AC_SUBST([pkglangdatadir], ['$(pkgdatadir)/langdata'])
AC_SUBST([pkglangdatadedir], ['$(pkgdatadir)/langdata/de'])
AC_SUBST([pkglangdataendir], ['$(pkgdatadir)/langdata/en'])
AC_SUBST([pmdir], [$PMDIR])
AC_SUBST([pmwikilintdir], ['$(pmdir)/Wikilint'])
AC_SUBST([pmwikilintdbdir], ['$(pmdir)/Wikilint/DB'])
# URL paths.
AC_ARG_WITH([tool_path],
AS_HELP_STRING([--with-tool_path=URL],
[Use URL as tool path]),
[TOOL_PATH=${withval}],
[TOOL_PATH=http://toolserver.org/~timl/cgi-bin/wikilint])
AC_ARG_WITH([static_html_path],
AS_HELP_STRING([--with-static_html_path=URL],
[Use URL as static HTML path]),
[STATIC_HTML_PATH=${withval}],
[STATIC_HTML_PATH=/~timl/wikilint/])
AC_SUBST([tool_path], [$TOOL_PATH])
AC_SUBST([static_html_path], [$STATIC_HTML_PATH])
AC_CONFIG_FILES([Makefile
cgi-bin/Makefile
htdocs/Makefile
lib/Makefile
lib/Wikilint/Makefile
lib/Wikilint/DB/Makefile
share/langdata/de/Makefile
share/langdata/en/Makefile
tests/Makefile])
AC_OUTPUT