-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
executable file
·101 lines (82 loc) · 4.47 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
94
95
96
97
98
99
100
101
AC_INIT([Personal Information Manager],
0.1.3,
pim,
http://www.mircoschoenfeld.de)
AM_INIT_AUTOMAKE([foreign])
AM_PATH_PYTHON([3.5])
AC_CONFIG_FILES([Makefile src/Makefile src/pim_mailhelper/Makefile src/pim_modules/Makefile config/Makefile cron/Makefile])
AC_CONFIG_FILES([src/pim_modules/daily/Makefile src/pim_modules/expenses/Makefile])
AC_SUBST(RCV_BASE_PATH,"$localstatedir/log/")
AC_ARG_VAR(RCV_BASE_PATH, 'set location of log output dir')
AC_SUBST(DAILY_BASE_PATH,"$localstatedir/mail/")
AC_ARG_VAR(DAILY_BASE_PATH, 'set location of reminders file')
AC_SUBST(EXPENSES_BASE_PATH,"$localstatedir/expenses/")
AC_ARG_VAR(EXPENSES_BASE_PATH, 'set location of expense databases')
AC_SUBST(STD_REMINDER_FILE,"$DAILY_BASE_PATH/pim_daily_reminder")
AC_SUBST(CRONPATTERN,'0 5 * * *')
AC_ARG_VAR(CRONPATTERN, 'set cron pattern to configure sending of reminder')
AC_SUBST(MAILALIAS,'reminder')
AC_ARG_VAR(MAILALIAS, 'set mailalias for receiving mails')
AC_SUBST(PIM_CONFDIR,"$sysconfdir/pim")
AC_ARG_VAR(PIM_CONFDIR, 'set directory for config file')
AC_SUBST(MAIL_USER,"mail")
AC_ARG_VAR(MAIL_USER, 'username of mailserver')
AC_CONFIG_MACRO_DIRS([m4])
AX_PYTHON_MODULE(dateparser, "", python3)
AX_PYTHON_MODULE([requests], "", python3)
AX_PYTHON_MODULE(configparser, "", python3)
AC_ARG_ENABLE([daily],
[AS_HELP_STRING([--disable-daily],[Turn off daily. Default is enabled.])],
[enable_daily="$enableval"],[enable_daily="yes"])
AM_CONDITIONAL([INSTALL_DAILY], [test "x$enable_daily" = "xyes" ])
AC_ARG_ENABLE([expenses],
[AS_HELP_STRING([--disable-expenses],[Turn off expenses. Default is enabled.])],
[enable_expenses="$enableval"],[enable_expenses="yes"])
AM_CONDITIONAL([INSTALL_EXPENSES], [test "x$enable_expenses" = "xyes" ])
AC_ARG_ENABLE([dailyexpenses],
[AS_HELP_STRING([--enable-dailyexpenses],[Turn on daily expense report. Default is disabled.])],
[enable_dailyexpenses="$enableval"],[enable_dailyexpenses="no" ])
AM_CONDITIONAL([INSTALL_DAILY_EXPENSES], [test "x$enable_dailyexpenses" = "xyes" ])
AM_CONDITIONAL([INSTALL_EXPENSES_CONFIG], [test "x$enable_expenses" = "xyes" -o "x$enable_dailyexpenses" = "xyes" ])
AC_ARG_ENABLE([dailyweather],
[AS_HELP_STRING([--enable-dailyweather],[Turn on daily weather report. Default is disabled.])],
[enable_dailyweather="$enableval"],[enable_dailyweather="no"])
AM_CONDITIONAL([INSTALL_DAILY_WEATHER], [test "x$enable_dailyweather" = "xyes"])
AC_ARG_ENABLE([dailyattachments],
[AS_HELP_STRING([--enable-dailyattachments],[Turn on attachments to daily report. Default is disabled.])],
[enable_dailyattachments="$enableval"],[enable_dailyattachments="no"])
AM_CONDITIONAL([INSTALL_DAILY_ATTACHMENTS], [test "x$enable_dailyattachments" = "xyes"])
AC_ARG_ENABLE([filelog],
[AS_HELP_STRING([--enable-filelog],[Turn on PIMs file log. Default is disabled.])],
[enable_filelog="$enableval"],[enable_filelog="no"])
AM_CONDITIONAL([PIM_FILE_LOG_ACTIVATED], [test "x$enable_filelog" = "xyes"])
AS_IF([test "x$enable_daily" = "xyes"],
[
AX_PROG_PERL_MODULES( iCal::Parser, , [AC_MSG_ERROR([perl module iCal::Parser required, but not found.])])
AC_CHECK_PROG(sendmail_exists,sendmail,yes)
AS_IF([test "x$sendmail_exists" != "xyes"], [AC_MSG_ERROR([sendmail required, but not found.])])
AC_CHECK_PROG(postfix_exists,postfix,yes)
AS_IF([test "x$postfix_exists" != "xyes"], [AC_MSG_ERROR([postfix required, but not found.])])
AC_CHECK_PROG(remind_exists,remind,yes)
AS_IF([test "x$remind_exists" != "xyes"], [AC_MSG_ERROR([remind required, but not found.])])
])
AS_IF([test "x$enable_dailyweather" = "xyes"],
[
AS_IF([test "x$HAVE_PYMOD_CONFIGPARSER" = x"no"], [AC_MSG_ERROR([missing python module: configparser])])
AS_IF([test "x$HAVE_PYMOD_DATEPARSER" = x"no"], [AC_MSG_ERROR([missing python module: dateparser])])
AS_IF([test "x$HAVE_PYMOD_REQUESTS" = x"no"], [AC_MSG_ERROR([missing python module: requests])])
AS_IF([test "x$enable_daily" = "xno"], [AC_MSG_ERROR([turned on daily weather report but disabled daily])])
])
AS_IF([test "x$enable_dailyexpenses" = "xyes"],
[
AS_IF([test "x$enable_daily" = "xno"], [AC_MSG_ERROR([turned on daily expense report but disabled daily])])
])
AS_IF([test "x$enable_dailyattachments" = "xyes"],
[
AS_IF([test "x$enable_daily" = "xno"], [AC_MSG_ERROR([turned on daily attachments but disabled daily])])
])
AC_SUBST(VERSION)
AC_SUBST(PACKAGE_NAME)
AC_SUBST(PACKAGE_BUGREPORT)
AC_OUTPUT