summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/common.ac
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/common.ac')
-rw-r--r--Build/source/texk/kpathsea/common.ac77
1 files changed, 36 insertions, 41 deletions
diff --git a/Build/source/texk/kpathsea/common.ac b/Build/source/texk/kpathsea/common.ac
index 0580e4c5d9b..f2e73b6f7e9 100644
--- a/Build/source/texk/kpathsea/common.ac
+++ b/Build/source/texk/kpathsea/common.ac
@@ -5,12 +5,6 @@ dnl Common Autoconf sinclude file for kpathsea-using programs. (Have to
dnl use the m4 `sinclude' builtin instead of `include', since Autoconf
dnl disables `include'.)
-dnl These configure scripts won't work with anything else.
-AC_PREREQ(2.12.1)
-
-dnl Write output here, instead of putting a zillion -D's on the command line.
-AC_CONFIG_HEADERS([c-auto.h:c-auto.in], [date >stamp-auto])
-
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
@@ -23,8 +17,9 @@ AC_PROG_LIBTOOL
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_FUNC_CLOSEDIR_VOID
-AC_CHECK_HEADERS(assert.h float.h limits.h memory.h pwd.h stdlib.h \
- string.h strings.h sys/param.h unistd.h)
+AC_CHECK_HEADERS([assert.h float.h limits.h memory.h pwd.h stdlib.h \
+ string.h strings.h sys/param.h unistd.h])
+AC_CHECK_DECLS([strstr])
dnl Libtool supporting objects that may be required on ancient broken system.
AC_CHECK_FUNCS(putenv,, LTLIBOBJS="$LTLIBOBJS putenv.lo")
@@ -38,7 +33,7 @@ AC_CHECK_FUNCS(bcmp bcopy bzero getcwd getwd index memcmp memcpy rindex strchr s
AC_C_CONST
# Check whether struct stat provides high-res time.
-KPSE_STRUCT_ST_MTIM
+AC_CHECK_MEMBERS([struct stat.st_mtim])
# Check whether prototypes work.
AC_MSG_CHECKING(whether the compiler accepts prototypes)
@@ -47,24 +42,27 @@ AC_CACHE_VAL(kb_cv_c_prototypes,
kb_cv_c_prototypes=yes, kb_cv_c_prototypes=no)])dnl
AC_MSG_RESULT($kb_cv_c_prototypes)
if test "$kb_cv_c_prototypes" = yes; then
- AC_DEFINE(HAVE_PROTOTYPES)
+ AC_DEFINE([HAVE_PROTOTYPES], 1,
+ [Define to 1 if your compiler understands prototypes.])
fi
# This is a GNU libc invention.
-AC_MSG_CHECKING(whether program_invocation_name is predefined)
-AC_CACHE_VAL(kb_cv_var_program_inv_name,
+AC_MSG_CHECKING([whether program_invocation_name is predefined])
+AC_CACHE_VAL([kb_cv_var_program_inv_name],
[AC_TRY_LINK(,
[extern char *program_invocation_name; program_invocation_name = "love";],
- kb_cv_var_program_inv_name=yes, kb_cv_var_program_inv_name=no)])dnl
-AC_MSG_RESULT($kb_cv_var_program_inv_name)
+ [kb_cv_var_program_inv_name=yes], [kb_cv_var_program_inv_name=no])])dnl
+AC_MSG_RESULT([$kb_cv_var_program_inv_name])
if test "$kb_cv_var_program_inv_name" = yes; then
- AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)
+ AC_DEFINE([HAVE_PROGRAM_INVOCATION_NAME], 1,
+ [Define to 1 if you are using GNU libc or otherwise have global
+ variables `program_invocation_name' and `program_invocation_short_name'.])
fi
if test $ac_cv_func_getcwd = yes; then
# We only need to run this if we have getcwd.
-AC_MSG_CHECKING(whether getcwd uses fork or vfork)
-AC_CACHE_VAL(kb_cv_func_getcwd_forks,
+AC_MSG_CHECKING([whether getcwd uses fork or vfork])
+AC_CACHE_VAL([kb_cv_func_getcwd_forks],
[AC_TRY_RUN([
int fork() { exit(1); }
int vfork() { exit(1); }
@@ -73,11 +71,13 @@ char path[100];
int main() {
getcwd(path,100);
return 0;
-}], kb_cv_func_getcwd_forks=no, kb_cv_func_getcwd_forks=yes,
- kb_cv_func_getcwd_forks=no)])dnl
-AC_MSG_RESULT($kb_cv_func_getcwd_forks)
+}], [kb_cv_func_getcwd_forks=no], [kb_cv_func_getcwd_forks=yes],
+ [kb_cv_func_getcwd_forks=no])])dnl
+AC_MSG_RESULT([$kb_cv_func_getcwd_forks])
if test $kb_cv_func_getcwd_forks = yes; then
- AC_DEFINE(GETCWD_FORKS)
+ AC_DEFINE([GETCWD_FORKS], 1,
+ [Define to 1 if getcwd is implemented using fork or vfork. Let me know
+ if you have to add this by hand because configure failed to detect it.])
fi
fi
@@ -85,27 +85,22 @@ fi
sinclude(../../texk/kpathsea/withenable.ac)
# Implementation of those options.
-if test "x$with_mktexmf_default" = xyes; then
- AC_DEFINE(MAKE_TEX_MF_BY_DEFAULT)
-fi
-if test "x$with_mktexpk_default" = xyes; then
- AC_DEFINE(MAKE_TEX_PK_BY_DEFAULT)
-fi
-if test "x$with_mktextex_default" = xyes; then
- AC_DEFINE(MAKE_TEX_TEX_BY_DEFAULT)
-fi
-if test "x$with_mktexfmt_default" = xyes; then
- AC_DEFINE(MAKE_TEX_FMT_BY_DEFAULT)
-fi
-if test "x$with_mktextfm_default" = xyes; then
- AC_DEFINE(MAKE_TEX_TFM_BY_DEFAULT)
-fi
-if test "x$with_mkocp_default" = xyes; then
- AC_DEFINE(MAKE_OMEGA_OCP_BY_DEFAULT)
-fi
-if test "x$with_mkofm_default" = xyes; then
- AC_DEFINE(MAKE_OMEGA_OFM_BY_DEFAULT)
+AC_DEFUN([_KPSE_DEFINE_MAKE_BY_DEFAULT],
+[if test "x$with_$1_default" = xyes; then
+ AC_DEFINE([MAKE_$2_BY_DEFAULT], 1,
+ [Define to 1 if you want to run $1 if $3 missing, and to 0 if you don't.])
+else
+ AC_DEFINE([MAKE_$2_BY_DEFAULT], 0)
fi
+])# _KPSE_DEFINE_MAKE_BY_DEFAULT
+
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mktexmf], [TEX_MF], [MF source])
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mktexpk], [TEX_PK], [PK font])
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mktextex], [TEX_TEX], [TeX source])
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mktexfmt], [TEX_FMT], [format file])
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mktextfm], [TEX_TFM], [TFM file])
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mkocp], [OMEGA_OCP], [OCP file])
+_KPSE_DEFINE_MAKE_BY_DEFAULT([mkofm], [OMEGA_OFM], [OFM file])
# Is libm present. FIXME: do we need it at all?
AC_CHECK_LIB(m, main)