From: Nicolas Schodet Last-Update: 2025-08-08 Subject: Update configure.in for autoconf 2.71 This updates the autoconf code, and also removes tests which are no longer needed with today compilers. Forwarded: https://github.com/rosorio/buici-clock/pull/1 --- Makefile.in | 2 +- acconfig.h | 3 --- aclocal.m4 | 4 ---- clock.cxx | 14 +++----------- configure.in | 26 +++++++++++--------------- standard.h | 6 ++---- xo/Makefile.in | 3 ++- xo/configure.in | 18 ++++++++---------- xo/standard.h | 8 +++----- 9 files changed, 30 insertions(+), 54 deletions(-) delete mode 100644 acconfig.h delete mode 100644 aclocal.m4 diff --git a/Makefile.in b/Makefile.in index 726a4b9..0ec5e90 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,7 +58,7 @@ RELEASE_PATH=${HOME}/release XO_PATH=@XO_PATH@ CC=@CXX@ CFLAGS_I=-I${XO_PATH} @CAIRO_CFLAGS@ -CXXFLAGS=@CXXFLAGS@ +CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@ #CXXFLAGS=$(CXXFLAGS) -O #CXXFLAGS=$(CXXFLAGS) -O2 #CXXFLAGS=$(CXXFLAGS) -fomit-frame-pointer diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index 2563c99..0000000 --- a/acconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -/* Define to `long' if doesn't define. */ -#undef time_t - diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 444c0d8..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,4 +0,0 @@ -dnl Our local extensions to standard type and constant search -AC_DEFUN(AC_TYPE_TIME_T, -[AC_CHECK_TYPE(time_t, long)]) - diff --git a/clock.cxx b/clock.cxx index 400e713..132618d 100644 --- a/clock.cxx +++ b/clock.cxx @@ -45,21 +45,13 @@ /* ----- Includes */ #include "standard.h" -#if defined (STDC_HEADERS) -# include -#endif +#include #include -#if TIME_WITH_SYS_TIME +#if HAVE_SYS_TIME_H # include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif +#include #include "version.h" diff --git a/configure.in b/configure.in index bf6eb66..57f410b 100644 --- a/configure.in +++ b/configure.in @@ -1,11 +1,11 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION([$Id: configure.in,v 1.16 2001/03/31 21:18:12 elf Exp $]) -AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. -AC_INIT(buici.xbm) dnl Name of unique file that must exist +AC_PREREQ([2.71])dnl dnl Minimum Autoconf version required. +AC_INIT +AC_CONFIG_SRCDIR([buici.xbm]) dnl Name of unique file that must exist -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) -AC_LANG_CPLUSPLUS dnl Default to c++ cause that what we done. +AC_LANG([C++]) dnl Default to c++ cause that what we done. dnl Checks for programs. dnl AC_PROG_CC @@ -33,10 +33,8 @@ AC_CHECK_LIB(m, cos) dnl Checks for header files. dnl AC_HEADER_DIRENT AC_PATH_XTRA -AC_HEADER_STDC -AC_CHECK_FUNCS(memset strncmp) -dnl AC_CHECK_HEADERS(fcntl.h ncurses/curses.h ncurses.h curses.h gpm.h) -AC_CHECK_HEADERS(unistd.h) + +AC_CHECK_HEADERS([unistd.h]) dnl Checks for typedefs, structures, and compiler characteristics. dnl -- Removed because it tends to interfere with headers @@ -44,11 +42,8 @@ dnl AC_C_CONST dnl -- Removed because it tends to interfere with headers dnl AC_C_INLINE dnl AC_TYPE_OFF_T -AC_TYPE_TIME_T -AC_HEADER_TIME -dnl AC_TYPE_UMODE_T -AC_STRUCT_TM -AC_STRUCT_TIMEZONE +AC_CHECK_HEADERS_ONCE([sys/time.h]) + dnl AC_CHECK_SIZEOF(long, 4) dnl -- Make sure to warn user dnl AC_CHECK_SIZEOF(int, 4) dnl -- about these defaults. @@ -61,7 +56,8 @@ PKG_CHECK_MODULES([CAIRO],[cairo]) AC_SUBST(XO_PATH) AC_SUBST(CFLAGS_W) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT dnl -- Prevent accidental edits. chmod -w Makefile diff --git a/standard.h b/standard.h index e24cfcf..8460b9f 100644 --- a/standard.h +++ b/standard.h @@ -39,10 +39,8 @@ #if defined (HAVE_UNISTD_H) # include #endif -#if defined (STDC_HEADERS) -# include -# include -#endif +#include +#include #include "assert.h" //#include "dmalloc.h" diff --git a/xo/Makefile.in b/xo/Makefile.in index dead45e..8a9ef82 100644 --- a/xo/Makefile.in +++ b/xo/Makefile.in @@ -56,7 +56,7 @@ OBJ_LIB=$(_OBJ_LIB:.y=.o) VERSION_HEADER=version.h CC=@CXX@ -CXXFLAGS=@CXXFLAGS@ +CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@ #CXXFLAGS=-${CXXFLAGS} -O #CXXFLAGS=-${CXXFLAGS} -O2 #CXXFLAGS=-${CXXFLAGS} -fomit-frame-pointer @@ -76,6 +76,7 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ infodir = @infodir@ mandir = @mandir@ +datarootdir = @datarootdir@ # # --- Implicit rules diff --git a/xo/configure.in b/xo/configure.in index d96bebb..f82b6c1 100644 --- a/xo/configure.in +++ b/xo/configure.in @@ -1,15 +1,15 @@ dnl Process this file with autoconf to produce a configure script. -AC_REVISION([$Id: configure.in,v 1.5 2000/01/13 07:04:46 elf Exp $]) -AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. -AC_INIT(ldisplay.cxx) dnl Name of unique file that must exist +AC_PREREQ([2.71])dnl dnl Minimum Autoconf version required. +AC_INIT +AC_CONFIG_SRCDIR([ldisplay.cxx]) dnl Name of unique file that must exist -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) -AC_LANG_CPLUSPLUS dnl Default to c++ cause that what we done. +AC_LANG([C++]) dnl Default to c++ cause that what we done. dnl Checks for programs. AC_PROG_YACC -AC_PROG_LEX +AC_PROG_LEX([noyywrap]) AC_PROG_CXX AC_PROG_LN_S @@ -20,8 +20,6 @@ fi dnl Checks for header files. AC_PATH_XTRA -AC_HEADER_STDC -AC_CHECK_FUNCS(memset strncmp) AC_CHECK_HEADERS(memory.h fcntl.h limits.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. @@ -30,7 +28,6 @@ dnl AC_C_CONST dnl -- Removed because it tends to interfere with headers dnl AC_C_INLINE AC_TYPE_SIZE_T -AC_HEADER_TIME dnl Checks for library functions. dnl AC_FUNC_MMAP @@ -38,7 +35,8 @@ dnl AC_FUNC_VPRINTF dnl -- We use vsprintf AC_SUBST(CFLAGS_W) -AC_OUTPUT(Makefile) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT dnl -- Prevent accidental edits. chmod -w Makefile diff --git a/xo/standard.h b/xo/standard.h index 634c31f..2b06c53 100644 --- a/xo/standard.h +++ b/xo/standard.h @@ -37,11 +37,9 @@ #include "config.h" // autoconf configuration header -#if defined (STDC_HEADERS) -# include -# include -# include -#endif +#include +#include +#include #if defined (HAVE_UNISTD_H) # include #endif