configure.ac 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ## Process this file with autoconf to produce a configure script.
  2. #
  3. # Copyright © 2003, 2005, 2012, 2014 Dale Mellor <mcron-lsfnyl@rdmp.org>
  4. # Copyright © 2015, 2016, 2017, 2018, 2020 Mathieu Lirzin <mthl@gnu.org>
  5. # Copyright © 2018 宋文武 <iyzsong@member.fsf.org>
  6. #
  7. # This file is part of GNU Mcron.
  8. #
  9. # GNU Mcron is free software: you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation, either version 3 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # GNU Mcron is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with GNU Mcron. If not, see <http://www.gnu.org/licenses/>.
  21. AC_PREREQ([2.69])
  22. AC_INIT([GNU Mcron],[1.2.1],[bug-mcron@gnu.org])
  23. AC_CONFIG_SRCDIR([src/mcron/scripts/mcron.scm])
  24. AC_CONFIG_AUX_DIR([build-aux])
  25. AC_REQUIRE_AUX_FILE([test-driver.scm])
  26. dnl We're fine with GNU make constructs, hence '-Wno-portability'.
  27. AM_INIT_AUTOMAKE([1.11 gnu silent-rules subdir-objects color-tests
  28. -Wall -Wno-override -Wno-portability std-options])
  29. AM_SILENT_RULES([yes]) # Enables silent rules by default.
  30. AC_CANONICAL_HOST
  31. dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
  32. dnl Make sure they are available when generating the configure script.
  33. m4_pattern_forbid([^PKG_PROG])
  34. m4_pattern_forbid([^PKG_CHECK])
  35. m4_pattern_forbid([^GUILE_P])
  36. m4_pattern_allow([^GUILE_PKG_ERRORS])
  37. m4_pattern_allow([^GUILE_PKG])
  38. m4_pattern_allow([^GUILE_PROGS])
  39. # Check for latest Guile development files.
  40. GUILE_PKG([3.0 2.2 2.0])
  41. # Checks for programs.
  42. GUILE_PROGS
  43. AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
  44. # Let users choose the Mail Transfert Agent (MTA) of their choice. Default to
  45. # a non-absolute program name to make it a loose dependency resolved at
  46. # runtime.
  47. AC_ARG_WITH([sendmail],
  48. [AS_HELP_STRING([--with-sendmail=COMMAND],
  49. [command to read an email message from standard input, and send it])],
  50. [SENDMAIL="$withval"],
  51. [SENDMAIL="sendmail -t"])
  52. AC_SUBST([SENDMAIL])
  53. AC_ARG_ENABLE([multi-user],
  54. [AS_HELP_STRING([--disable-multi-user],
  55. [Don't Install legacy cron and crontab programs])],
  56. [enable_multi_user="$enableval"],
  57. [enable_multi_user="yes"])
  58. AM_CONDITIONAL([MULTI_USER], [test "x$enable_multi_user" = xyes])
  59. # Configure the various files that mcron uses at runtime.
  60. AC_MSG_CHECKING([which spool directory to use])
  61. AC_ARG_WITH(spool-dir,
  62. AS_HELP_STRING([--with-spool-dir],[the crontab spool directory (/var/cron/tabs)]),
  63. CONFIG_SPOOL_DIR=$withval,
  64. CONFIG_SPOOL_DIR=[/var/cron/tabs])
  65. AC_MSG_RESULT($CONFIG_SPOOL_DIR)
  66. AC_SUBST(CONFIG_SPOOL_DIR)
  67. AC_MSG_CHECKING([name of socket])
  68. AC_ARG_WITH(socket-file,
  69. AS_HELP_STRING([--with-socket-file],[unix pathname for cron socket (/var/cron/socket)]),
  70. CONFIG_SOCKET_FILE=$withval,
  71. CONFIG_SOCKET_FILE=[/var/cron/socket])
  72. AC_MSG_RESULT($CONFIG_SOCKET_FILE)
  73. AC_SUBST(CONFIG_SOCKET_FILE)
  74. AC_MSG_CHECKING([name of allow file])
  75. AC_ARG_WITH(allow-file,
  76. AS_HELP_STRING([--with-allow-file],[the file of allowed users (/var/cron/allow)]),
  77. CONFIG_ALLOW_FILE=$withval,
  78. CONFIG_ALLOW_FILE=[/var/cron/allow])
  79. AC_MSG_RESULT($CONFIG_ALLOW_FILE)
  80. AC_SUBST(CONFIG_ALLOW_FILE)
  81. AC_MSG_CHECKING([name of deny file])
  82. AC_ARG_WITH(deny-file,
  83. AS_HELP_STRING([--with-deny-file],[the file of barred users (/var/cron/deny)]),
  84. CONFIG_DENY_FILE=$withval,
  85. CONFIG_DENY_FILE=[/var/cron/deny])
  86. AC_MSG_RESULT($CONFIG_DENY_FILE)
  87. AC_SUBST(CONFIG_DENY_FILE)
  88. AC_MSG_CHECKING([name of PID file])
  89. AC_ARG_WITH(pid-file,
  90. AS_HELP_STRING([--with-pid-file],[the file to record cron's PID (/var/run/cron.pid)]),
  91. CONFIG_PID_FILE=$withval,
  92. CONFIG_PID_FILE=[/var/run/cron.pid])
  93. AC_MSG_RESULT($CONFIG_PID_FILE)
  94. AC_SUBST(CONFIG_PID_FILE)
  95. AC_MSG_CHECKING([directory to hold temporary files])
  96. AC_ARG_WITH(tmp-dir,
  97. AS_HELP_STRING([--with-tmp-dir],[directory to hold temporary files (/tmp)]),
  98. CONFIG_TMP_DIR=$withval,
  99. CONFIG_TMP_DIR=[/tmp])
  100. AC_MSG_RESULT($CONFIG_TMP_DIR)
  101. AC_SUBST(CONFIG_TMP_DIR)
  102. # Include the Maintainer's Makefile fragment, if it's here.
  103. MAINT_MAKEFILE=/dev/null
  104. AS_IF([test -r "$srcdir/maint.mk"],
  105. [MAINT_MAKEFILE="$srcdir/maint.mk"])
  106. AC_SUBST_FILE([MAINT_MAKEFILE])
  107. AC_CONFIG_FILES([pre-inst-env:build-aux/pre-inst-env.in],
  108. [chmod +x pre-inst-env])
  109. AC_CONFIG_FILES([doc/config.texi
  110. Makefile
  111. src/mcron/config.scm])
  112. AC_OUTPUT