diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-20 09:32:22 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-03-20 09:32:22 +0000 |
commit | 6b3b122ab7e6994e0b4c8d1299eb2c3462388542 (patch) | |
tree | 8df640914e18a1c034efac2ea9daf46a93dfd791 /Build/source/texk/kpathsea/configure.ac | |
parent | 34720aca96718a0d370b50dfbc3726a3367f4f49 (diff) |
new build system
git-svn-id: svn://tug.org/texlive/trunk@12455 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/configure.ac')
-rw-r--r-- | Build/source/texk/kpathsea/configure.ac | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/Build/source/texk/kpathsea/configure.ac b/Build/source/texk/kpathsea/configure.ac new file mode 100644 index 00000000000..d03a9c058fb --- /dev/null +++ b/Build/source/texk/kpathsea/configure.ac @@ -0,0 +1,117 @@ +dnl Process this file with autoconf to produce a configure script. +dnl +dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +dnl +dnl This file is free software; the copyright holder +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl -------------------------------------------------------- +dnl +dnl Kpathsea package version: +dnl Starting development: +dnl kpse_devel_version = dev; +dnl Making releases: +dnl kpse_micro_version += 1; +dnl kpse_devel_version = ; +dnl +dnl Kpathsea shared library version: +dnl Only bug fixes: +dnl kpse_lib_micro += 1; +dnl Adding new interfaces (backwards compatible) +dnl kpse_lib_minor += 1; +dnl kpse_lib_micro = 0; +dnl Modifying or revoking interfaces (not backwards compatible) +dnl kpse_lib_major += 1; +dnl kpse_lib_minor = 0; +dnl kpse_lib_micro = 0; +dnl +m4_define([kpse_major_version], [3])[]dnl +m4_define([kpse_minor_version], [5])[]dnl +m4_define([kpse_micro_version], [7])[]dnl +m4_define([kpse_devel_version], [dev])[]dnl +m4_define([kpse_version], [kpse_major_version.kpse_minor_version.kpse_micro_version[]kpse_devel_version])[]dnl + +m4_define([kpse_lib_major], [5])[]dnl +m4_define([kpse_lib_minor], [0])[]dnl +m4_define([kpse_lib_micro], [0])[]dnl + +AC_INIT([Kpathsea], [kpse_version], [tex-k@tug.org]) +AC_PREREQ([2.63]) +AC_CONFIG_SRCDIR([pathsearch.c]) +AC_CONFIG_AUX_DIR([../../build-aux]) +AC_CONFIG_MACRO_DIR([../../m4]) + +AC_SUBST([KPSEVERSION], [kpse_version]) +AC_DEFINE([KPSEVERSION], ["kpathsea version kpse_version"]) +AC_SUBST([KPSE_LT_VERSNUM], [kpse_lib_major:kpse_lib_minor:kpse_lib_micro]) + +dnl Common code for all programs using libkpathsea. +KPSE_COMMON([kpathsea]) +dnl Include additional code for kpathsea. +KPSE_WEB2C_PREPARE +m4_sinclude([ac/web2c.ac]) + +dnl Generate MAKE_TEX_*_BY_DEFAULT and MAKE_OMEGA_*_BY_DEFAULT defines. +m4_foreach([Kpse_Mktex], [kpse_mktex_opts], + [m4_ifset([Kpse_Mktex], + [KPSE_MKTEX_DEFINE(Kpse_Mktex)])])[]dnl + +dnl Replacement functions that may be required on ancient broken system. +AC_CHECK_DECLS([putenv, strstr]) +AC_REPLACE_FUNCS([putenv strcasecmp strtol strstr]) + +if test $ac_cv_func_getcwd = yes; then +# We only need to run this if we have getcwd. +AC_CACHE_CHECK([whether getcwd uses fork or vfork], + [kb_cv_func_getcwd_forks], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[int fork() { exit(1); } + int vfork() { exit(1); } + extern char *getcwd(); + char path[100];]], + [[getcwd(path,100);]])], + [kb_cv_func_getcwd_forks=no], + [kb_cv_func_getcwd_forks=yes], + [kb_cv_func_getcwd_forks=no])]) +if test $kb_cv_func_getcwd_forks = yes; then + 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 + +dnl Write output here, instead of putting a zillion -D's on the command line. +AC_CONFIG_HEADERS([c-auto.h:c-auto.in], + [sed -e 's/^#define PACKAGE/#define KPSE_PACKAGE/' \ + -e 's/^#define VERSION/#define KPSE_VERSION/' c-auto.h >c-auto.tmp && mv -f c-auto.tmp c-auto.h]) + +AH_TOP([/* c-auto.h: defines for kpathsea, as determined by configure. + + Copyright 1994-97, 2008, 2009 Karl Berry. + Copyright 1997-99, 2002, 2005 Olaf Weber. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this library; if not, see <http://www.gnu.org/licenses/>. */ + +/* Guard against double inclusion. */ +#ifndef KPATHSEA_C_AUTO_H +#define KPATHSEA_C_AUTO_H + +/* kpathsea: the version string. */ +#define KPSEVERSION "REPLACE-WITH-KPSEVERSION"]) +AH_BOTTOM([#endif /* !KPATHSEA_C_AUTO_H */]) + +AC_CONFIG_FILES([Makefile doc/Makefile man/Makefile]) + +AC_OUTPUT |