Skip to content

Commit bfbfc57

Browse files
authored
back: find the auxiliary files when GNUSTEP_MAKEFILES is unset (#162)
configure passed the GNUSTEP_MAKEFILES variable straight to AC_CONFIG_AUX_DIR, but the generated configure searches for config.guess and config.sub before the shell code that sets GNUSTEP_MAKEFILES from gnustep-config has run. With GNUSTEP_MAKEFILES unset in the environment configure then failed with "cannot find required auxiliary files". Resolve the makefiles directory inline in the AC_CONFIG_AUX_DIR argument, the way gnustep-base already does, so the auxiliary files are found whether or not GNUSTEP_MAKEFILES is set in the environment. The generated configure is updated to match.
1 parent 03154a0 commit bfbfc57

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

configure

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,11 @@ as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
25622562
ac_aux_files="config.guess config.sub"
25632563

25642564
# Locations in which to look for auxiliary files.
2565-
ac_aux_dir_candidates="$GNUSTEP_MAKEFILES"
2565+
ac_aux_dir_candidates="`if test -z "$GNUSTEP_MAKEFILES"; then
2566+
gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5
2567+
else
2568+
echo $GNUSTEP_MAKEFILES
2569+
fi`"
25662570

25672571
# Search for a directory containing all of the required auxiliary files,
25682572
# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.

configure.ac

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,15 @@ fi
4141

4242
#--------------------------------------------------------------------
4343
# Use config.guess, config.sub and install-sh provided by gnustep-make
44+
# Evaluation order of the configure script means we can not depend on
45+
# GNUSTEP_MAKEFILES being set for simple variable substitution, so we
46+
# execute a bit of shell code to dynamically get the directory.
4447
#--------------------------------------------------------------------
45-
AC_CONFIG_AUX_DIR($GNUSTEP_MAKEFILES)
48+
AC_CONFIG_AUX_DIR([`if test -z "$GNUSTEP_MAKEFILES"; then
49+
gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5
50+
else
51+
echo $GNUSTEP_MAKEFILES
52+
fi`])
4653

4754
#--------------------------------------------------------------------
4855
# Determine the host, build, and target systems

0 commit comments

Comments
 (0)