aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2012-10-11 01:06:52 +0800
committerLAN-TW <lantw44@gmail.com>2012-10-11 01:06:52 +0800
commit65c8bf8a1ea5e74c3965374723fdbdf5cf5ce3ea (patch)
tree594294bc2170ba3444fff7f6a1e2271d819a48de
parent29d8911510eef6155ffd29596be036df3c6b8e4c (diff)
downloadsctjudge-65c8bf8a1ea5e74c3965374723fdbdf5cf5ce3ea.tar.gz
sctjudge-65c8bf8a1ea5e74c3965374723fdbdf5cf5ce3ea.tar.zst
sctjudge-65c8bf8a1ea5e74c3965374723fdbdf5cf5ce3ea.zip
延伸 UID/GID 與名稱轉換的功能
修改 configure.ac,使用者可以很容易的從 configure 的結果看出是否啟用這項功能。 同時也加入將 configure 結束訊息寫入 config.msg 的功能。 (問題:tee 在各個系統都有嗎?會不會造成可攜性問題?)
-rw-r--r--configure.ac27
1 files changed, 17 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 0661c5e..c51735a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,17 +121,24 @@ AC_CHECK_FUNCS([clock_gettime dup2 memset setlocale strchr strerror strrchr getu
[], AC_MSG_ERROR(This program requires all these functions!))
AC_CHECK_FUNCS([getpwnam getgrnam getpwuid getgrgid],
- AC_DEFINE([HAVE_CONF_UGIDNAME], [1],
- [Conversion between user or group ID and name]), [])
+ opt_ugidname=yes, opt_ugidname=no)
+
+test x"${opt_ugidname}" = xyes && \
+ AC_DEFINE([HAVE_CONF_UGIDNAME], [1],
+ [Conversion between user or group ID and name])
AC_CONFIG_FILES([Makefile sctjudge.spec src/Makefile src/version.h])
AC_OUTPUT
-echo ""
-echo "Optional Features:"
-echo "(1) Process monitor using Linux /proc filesystem .... $opt_procmon"
-echo "(2) Linux capabilities support ...................... $opt_cap"
-echo "-------------------------------------------------------------"
-echo "Compiling and Linking Options:"
-echo "(1) Debugging information ........................... $opt_debug"
-echo "(2) Statically linked executable .................... $opt_static"
+confmsgsave="config.msg"
+
+echo "" | tee "$confmsgsave"
+echo "Optional Features:" | tee -a "$confmsgsave"
+echo "(1) Conversion between user or group ID and name .... $opt_ugidname" | tee -a "$confmsgsave"
+echo "(2) Process monitor using Linux /proc filesystem .... $opt_procmon" | tee -a "$confmsgsave"
+echo "(3) Linux capabilities support ...................... $opt_cap" | tee -a "$confmsgsave"
+echo "-------------------------------------------------------------" | tee -a "$confmsgsave"
+echo "Compiling and Linking Options:" | tee -a "$confmsgsave"
+echo "(1) Debugging information ........................... $opt_debug" | tee -a "$confmsgsave"
+echo "(2) Statically linked executable .................... $opt_static" | tee -a "$confmsgsave"
+echo "The above messages has been written to $confmsgsave"