Skip to content

Commit ae8bf4a

Browse files
committed
Updates to configure/Makefile scripts for improved portability.
git-svn-id: https://secure.a-eskwadraat.nl/svn/domjudge/trunk@3319 caf94f87-7bd6-0310-88dc-dee8202e2269
1 parent adf9ffd commit ae8bf4a

File tree

6 files changed

+544
-19
lines changed

6 files changed

+544
-19
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ maintainer-install: domserver judgehost docs submitclient \
143143
ln -sf $(PWD)/judge $(judgehost_libjudgedir)
144144
ln -sf $(PWD)/submit $(domserver_libsubmitdir)
145145
ln -sfn $(PWD)/doc $(domserver_wwwdir)/jury/doc
146-
mkdir -p $(judgehost_bindir)
146+
$(MKDIR_P) $(judgehost_bindir)
147147
ln -sf $(PWD)/judge/runguard $(judgehost_bindir)
148148
ln -sf $(PWD)/judge/runpipe $(judgehost_bindir)
149149
# Make tmpdir writable for webserver, because judgehost-create-dirs

Makefile.global

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ include $(TOPDIR)/paths.mk
2626
endif
2727

2828
# Install settings
29-
INSTALL = install
3029
INSTALL_PROG = $(INSTALL)
3130
INSTALL_DATA = $(INSTALL) -m 0644
3231
INSTALL_USER = $(INSTALL) -m 0644 -o $(DOMJUDGE_USER)
3332
INSTALL_WEBSITE = $(INSTALL) -m 0644 -o $(DOMJUDGE_USER) -g $(WEBSERVER_GROUP)
34-
INSTALL_DIR = mkdir -p
33+
INSTALL_DIR = $(MKDIR_P)
3534

3635
# Check whether we are running under Cygwin:
3736
ifneq ($(findstring CYGWIN,$(shell uname)),)

configure.ac

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
AC_INIT([DOMjudge],
33
m4_esyscmd([sed -n '1s/^.*version //p' README | tr -d '\n']),
44
5+
AC_PREREQ([2.60])
6+
AC_REVISION($Rev$)
57
AC_CONFIG_HEADERS([etc/config.h])
68
AC_CONFIG_SRCDIR([Makefile.global])
79

@@ -19,7 +21,7 @@ if test "x$prefix" = xNONE; then
1921
fi
2022

2123
if test -z "$PACKAGE_VERSION"; then
22-
AC_MSG_ERROR([Could not find version on first line of README file.])
24+
AC_MSG_ERROR([could not find version on first line of README file.])
2325
fi
2426
AC_SUBST(DOMJUDGE_VERSION, $PACKAGE_VERSION)
2527
AC_DEFINE_UNQUOTED(DOMJUDGE_VERSION, "$PACKAGE_VERSION",
@@ -40,7 +42,7 @@ DEF_LDFLAGS=""
4042

4143
AX_CHECK_COMPILER_FLAGS(-Wall, DEF_CXFLAGS="$DEF_CXFLAGS -Wall")
4244
AX_CHECK_COMPILER_FLAGS(-fstack-protector, DEF_CXFLAGS="$DEF_CXFLAGS -fstack-protector")
43-
AX_CHECK_COMPILER_FLAGS(-fPIE, DEF_CXFLAGS="$DEF_CXFLAGS -fPIE"
45+
AX_CHECK_COMPILER_FLAGS(-fPIE -pie, DEF_CXFLAGS="$DEF_CXFLAGS -fPIE"
4446
DEF_LDFLAGS="$DEF_LDFLAGS -pie")
4547

4648
test "x$enable_CFLAGS_setting" = xyes && AC_SUBST(CFLAGS, $DEF_CXFLAGS)
@@ -208,9 +210,10 @@ AC_SUBST(CHROOTDIR, $judgehost_chrootdir)
208210
AC_PROG_CXX
209211
AC_PROG_CC
210212
AC_PROG_CPP
211-
#AC_PROG_INSTALL
213+
AC_PROG_INSTALL
212214
AC_PROG_LN_S
213215
AC_PROG_MAKE_SET
216+
AC_PROG_MKDIR_P
214217

215218
# check for htpasswd/htpasswd2
216219
AC_CHECK_PROGS(HTPASSWD,[htpasswd htpasswd2],[no htpasswd binary found])
@@ -254,29 +257,25 @@ AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE, 200112L, [Include POSIX.1-2001 base specific
254257
AC_DEFINE_UNQUOTED(_XOPEN_SOURCE, 500, [Include SUSv2 (UNIX 98) extensions])
255258

256259
# Checks for header files.
257-
AC_HEADER_STDC
258-
AC_HEADER_SYS_WAIT
260+
AC_HEADER_STDBOOL
259261
AC_CHECK_HEADERS([fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h magic.h])
260262

261263
# Checks for typedefs, structures, and compiler characteristics.
262-
AC_C_CONST
264+
AC_C_INLINE
263265
AC_TYPE_PID_T
264266
AC_TYPE_SIZE_T
265267
AC_TYPE_SSIZE_T
266-
AC_HEADER_TIME
267-
AC_HEADER_STDBOOL
268268

269269
# Checks for library functions.
270+
dnl FIXME: need to use the results...
270271
AC_FUNC_ERROR_AT_LINE
271272
AC_FUNC_FORK
272-
AC_PROG_GCC_TRADITIONAL
273273
AC_FUNC_MALLOC
274-
AC_FUNC_SETVBUF_REVERSED
275-
AC_TYPE_SIGNAL
276-
AC_FUNC_STAT
277-
AC_FUNC_STRFTIME
278-
AC_FUNC_VPRINTF
279-
AC_CHECK_FUNCS([alarm dup2 getcwd gettimeofday memset mkdir realpath setenv socket strchr strdup strerror strncasecmp strrchr strstr strtol])
274+
AC_FUNC_REALLOC
275+
AC_FUNC_STRTOD
276+
AC_REPLACE_FUNCS([atexit dup2 getcwd gettimeofday memset mkdir realpath setenv \
277+
socket strchr strdup strerror strncasecmp strrchr strstr strtol],
278+
[],[AC_MSG_ERROR([required C function is missing.])])
280279

281280
AC_CONFIG_FILES([paths.mk])
282281
AC_OUTPUT

0 commit comments

Comments
 (0)