From: Tomas Mraz Date: Mon, 26 Nov 2012 10:41:55 +0000 (+0100) Subject: Enable system crontab by default and use AC_ARG_ENABLE instead of AC_ARG_WITH. X-Git-Tag: cronie1.4.10~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5136b29d18ab326312bb56196e0a83eb37141530;p=cronie Enable system crontab by default and use AC_ARG_ENABLE instead of AC_ARG_WITH. --- diff --git a/configure.ac b/configure.ac index 6cbca34..db2d579 100644 --- a/configure.ac +++ b/configure.ac @@ -212,11 +212,11 @@ AC_ARG_WITH(audit, fi ] ) -AC_ARG_WITH(syscrontab, - [AS_HELP_STRING([--with-syscrontab], [Build cronie with syscrontab enabled.])], - [ if test "x$withval" != xno; then - AC_DEFINE(WITH_SYSCRONTAB,1,[Define if you want syscrontab.]) - fi ] +AC_ARG_ENABLE(syscrontab, + [AS_HELP_STRING([--enable-syscrontab], [Build cronie with system crontab enabled.])], + [ if test "x$enableval" != xno; then + AC_DEFINE(ENABLE_SYSCRONTAB,1,[Define if you want system crontab.]) + fi ], [AC_DEFINE(ENABLE_SYSCRONTAB,1,[Define if you want system crontab.])] ) dnl CRONIE_VAR_DEFAULT (VAR, DESCRIPTION, DEFAULT) diff --git a/src/cron.c b/src/cron.c index 35ea241..5535017 100644 --- a/src/cron.c +++ b/src/cron.c @@ -59,7 +59,7 @@ static int DisableInotify; * clustering enabled. */ -# if defined WITH_SYSCRONTAB +# if defined ENABLE_SYSCRONTAB # define NUM_WATCHES 3 int wd[NUM_WATCHES]; diff --git a/src/database.c b/src/database.c index 0545913..1cf113a 100644 --- a/src/database.c +++ b/src/database.c @@ -321,7 +321,7 @@ void check_inotify_database(cron_db * old_db) { set_cron_watched(old_db->ifd); /* TODO: parse the events and read only affected files */ -#if defined WITH_SYSCRONTAB +#if defined ENABLE_SYSCRONTAB process_crontab("root", NULL, SYSCRONTAB, &new_db, old_db); #endif @@ -430,7 +430,7 @@ int load_database(cron_db * old_db) { max_mtime(SYS_CROND_DIR, &crond_stat); } -#if defined WITH_SYSCRONTAB +#if defined ENABLE_SYSCRONTAB /* track system crontab file */ if (stat(SYSCRONTAB, &syscron_stat) < OK) @@ -464,7 +464,7 @@ int load_database(cron_db * old_db) { new_db.ifd = old_db->ifd; #endif -#if defined WITH_SYSCRONTAB +#if defined ENABLE_SYSCRONTAB if (syscron_stat.st_mtime) process_crontab("root", NULL, SYSCRONTAB, &new_db, old_db); #endif