openafs/configure-libafs.ac

25 lines
587 B
Plaintext
Raw Permalink Normal View History

AC_PRERQ([2.60])
AC_INIT([OpenAFS],[m4_esyscmd(build-tools/git-version .)],[openafs-bugs@openafs.org],[],[http://www.openafs.org/])
AC_CONFIG_AUX_DIR([build-tools])
AC_CONFIG_SRCDIR([src/libafs/Makefile.common.in])
autoconf: Remove/update obsolete autoconf macros Autoconf 2.70 (released in 2020-12) produces warning messages about obsolete constructs by default. Running regen.sh with autoconf 2.70 installed produces the following warnings: .. configure.ac:7: warning: The macro `AC_CONFIG_HEADER' is obsolete. configure.ac:21: warning: AC_PROG_LEX without either yywrap or noyywrap is obsolete configure.ac:21: warning: The macro `AC_HEADER_STDC' is obsolete. configure.ac:21: warning: The macro `AC_HEADER_TIME' is obsolete. .. Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS Add the noyywrap parameter to AC_PROG_LEX. Use the noyywrap option since we already provide a yywrap function in the .l sources. Remove AC_HEADER_STDC. There are no references to the the autoconf variable set by this macro. This macro was marked as obsolete prior to autoconf 2.64 with the following note: "This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro." AC_HEADER_TIME was marked as obsolete prior to autoconf 2.64 with the following note: "This macro is obsolescent, as current systems can include both files when they exist. New programs need not use this macro." The only reference that requires AC_HEADER_TIME is within the external roken code pulled from heimdal. Compiles that use the external upstream heimdal packages result in a build error if TIME_WITH_SYS_TIME is not defined: building src/crypto/hcrypto src/external/heimdal/hcrypto/camellia.c include/roken.h:803:58: error: ‘struct tm’ declared inside Update autoheader.m4 so a define for TIME_WITH_SYS_TIME is created. This avoids modifying the external heimdal/roken code. Change-Id: If4d6c0650aac617f535b35f81994b54a3b8ac021 Reviewed-on: https://gerrit.openafs.org/14838 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2021-11-02 15:18:51 +00:00
AC_CONFIG_HEADERS([src/config/afsconfig.h])
MACOS_VERSION=1.9.2
AC_SUBST([MACOS_VERSION])
cf: Set CC before calling AC_PROG_CC On some platforms (HPUX, SOLARIS, AIX), we forcibly set CC or set a default CC, because we must use a specific compiler to build kernel modules, and we specify certain compiler-specific flags. But we do this after AC_PROG_CC has run, which also searches for a compiler to use, and runs a few tests against it. AC_PROG_CC often chooses a different compiler (it prefers gcc if it's available). As a result, some compiler-derived info may be wrong, which can yield confusing results, even breaking the build depending on what the user's PATH is, or what compilers are installed on the system. We can avoid all of this if we move our CC-setting logic to before AC_PROG_CC is called. This is a little tricky, because our logic to set AFS_SYSNAME requires the C compiler, so we must do this before OPENAFS_SYSNAME, and also before AC_USE_SYSTEM_EXTENSIONS, or any other autoconf macro that uses the C compiler. Move our CC-setting logic into a new macro, OPENAFS_PATH_CC, which is separate from OPENAFS_CONFIGURE_COMMON and must be called before OPENAFS_CONFIGURE_COMMON. Add some safeguards to try to detect if AC_PROG_CC is already called to try to prevent future changes from breaking this; this isn't perfect, but it's better than nothing. Change-Id: I7c327df5acc5d1ff701b70825eecaaaab4aa44a8 Reviewed-on: https://gerrit.openafs.org/15456 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Ben Huntsman <ben@huntsmans.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
2023-05-19 22:53:55 +01:00
OPENAFS_PATH_CC
OPENAFS_CONFIGURE_COMMON
AC_CONFIG_FILES([
Makefile
src/config/Makefile
src/config/Makefile.config
src/config/Makefile.lwp
src/config/Makefile.version-CML
src/config/Makefile.version-NOCML
src/libafs/Makefile.common
src/libafs/MakefileProto
])
AC_OUTPUT