| 1 |
From: Nicolas Schodet <[email protected]> |
| 2 |
Last-Update: 2025-08-08 |
| 3 |
Subject: Update configure.in for autoconf 2.71 |
| 4 |
|
| 5 |
This updates the autoconf code, and also removes tests which are no |
| 6 |
longer needed with today compilers. |
| 7 |
|
| 8 |
Forwarded: https://github.com/rosorio/buici-clock/pull/1 |
| 9 |
--- |
| 10 |
Makefile.in | 2 +- |
| 11 |
acconfig.h | 3 --- |
| 12 |
aclocal.m4 | 4 ---- |
| 13 |
clock.cxx | 14 +++----------- |
| 14 |
configure.in | 26 +++++++++++--------------- |
| 15 |
standard.h | 6 ++---- |
| 16 |
xo/Makefile.in | 3 ++- |
| 17 |
xo/configure.in | 18 ++++++++---------- |
| 18 |
xo/standard.h | 8 +++----- |
| 19 |
9 files changed, 30 insertions(+), 54 deletions(-) |
| 20 |
delete mode 100644 acconfig.h |
| 21 |
delete mode 100644 aclocal.m4 |
| 22 |
|
| 23 |
diff --git a/Makefile.in b/Makefile.in |
| 24 |
index 726a4b9..0ec5e90 100644 |
| 25 |
--- a/Makefile.in |
| 26 |
+++ b/Makefile.in |
| 27 |
@@ -58,7 +58,7 @@ RELEASE_PATH=${HOME}/release |
| 28 |
XO_PATH=@XO_PATH@ |
| 29 |
CC=@CXX@ |
| 30 |
CFLAGS_I=-I${XO_PATH} @CAIRO_CFLAGS@ |
| 31 |
-CXXFLAGS=@CXXFLAGS@ |
| 32 |
+CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@ |
| 33 |
#CXXFLAGS=$(CXXFLAGS) -O |
| 34 |
#CXXFLAGS=$(CXXFLAGS) -O2 |
| 35 |
#CXXFLAGS=$(CXXFLAGS) -fomit-frame-pointer |
| 36 |
diff --git a/acconfig.h b/acconfig.h |
| 37 |
deleted file mode 100644 |
| 38 |
index 2563c99..0000000 |
| 39 |
--- a/acconfig.h |
| 40 |
+++ /dev/null |
| 41 |
@@ -1,3 +0,0 @@ |
| 42 |
-/* Define to `long' if <time.h> doesn't define. */ |
| 43 |
-#undef time_t |
| 44 |
- |
| 45 |
diff --git a/aclocal.m4 b/aclocal.m4 |
| 46 |
deleted file mode 100644 |
| 47 |
index 444c0d8..0000000 |
| 48 |
--- a/aclocal.m4 |
| 49 |
+++ /dev/null |
| 50 |
@@ -1,4 +0,0 @@ |
| 51 |
-dnl Our local extensions to standard type and constant search |
| 52 |
-AC_DEFUN(AC_TYPE_TIME_T, |
| 53 |
-[AC_CHECK_TYPE(time_t, long)]) |
| 54 |
- |
| 55 |
diff --git a/clock.cxx b/clock.cxx |
| 56 |
index 400e713..132618d 100644 |
| 57 |
--- a/clock.cxx |
| 58 |
+++ b/clock.cxx |
| 59 |
@@ -45,21 +45,13 @@ |
| 60 |
/* ----- Includes */ |
| 61 |
|
| 62 |
#include "standard.h" |
| 63 |
-#if defined (STDC_HEADERS) |
| 64 |
-# include <stdarg.h> |
| 65 |
-#endif |
| 66 |
+#include <stdarg.h> |
| 67 |
#include <math.h> |
| 68 |
|
| 69 |
-#if TIME_WITH_SYS_TIME |
| 70 |
+#if HAVE_SYS_TIME_H |
| 71 |
# include <sys/time.h> |
| 72 |
-# include <time.h> |
| 73 |
-#else |
| 74 |
-# if HAVE_SYS_TIME_H |
| 75 |
-# include <sys/time.h> |
| 76 |
-# else |
| 77 |
-# include <time.h> |
| 78 |
-# endif |
| 79 |
#endif |
| 80 |
+#include <time.h> |
| 81 |
|
| 82 |
#include "version.h" |
| 83 |
|
| 84 |
diff --git a/configure.in b/configure.in |
| 85 |
index bf6eb66..57f410b 100644 |
| 86 |
--- a/configure.in |
| 87 |
+++ b/configure.in |
| 88 |
@@ -1,11 +1,11 @@ |
| 89 |
dnl Process this file with autoconf to produce a configure script. |
| 90 |
-AC_REVISION([$Id: configure.in,v 1.16 2001/03/31 21:18:12 elf Exp $]) |
| 91 |
-AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. |
| 92 |
-AC_INIT(buici.xbm) dnl Name of unique file that must exist |
| 93 |
+AC_PREREQ([2.71])dnl dnl Minimum Autoconf version required. |
| 94 |
+AC_INIT |
| 95 |
+AC_CONFIG_SRCDIR([buici.xbm]) dnl Name of unique file that must exist |
| 96 |
|
| 97 |
-AC_CONFIG_HEADER(config.h) |
| 98 |
+AC_CONFIG_HEADERS([config.h]) |
| 99 |
|
| 100 |
-AC_LANG_CPLUSPLUS dnl Default to c++ cause that what we done. |
| 101 |
+AC_LANG([C++]) dnl Default to c++ cause that what we done. |
| 102 |
|
| 103 |
dnl Checks for programs. |
| 104 |
dnl AC_PROG_CC |
| 105 |
@@ -33,10 +33,8 @@ AC_CHECK_LIB(m, cos) |
| 106 |
dnl Checks for header files. |
| 107 |
dnl AC_HEADER_DIRENT |
| 108 |
AC_PATH_XTRA |
| 109 |
-AC_HEADER_STDC |
| 110 |
-AC_CHECK_FUNCS(memset strncmp) |
| 111 |
-dnl AC_CHECK_HEADERS(fcntl.h ncurses/curses.h ncurses.h curses.h gpm.h) |
| 112 |
-AC_CHECK_HEADERS(unistd.h) |
| 113 |
+ |
| 114 |
+AC_CHECK_HEADERS([unistd.h]) |
| 115 |
|
| 116 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 117 |
dnl -- Removed because it tends to interfere with headers |
| 118 |
@@ -44,11 +42,8 @@ dnl AC_C_CONST |
| 119 |
dnl -- Removed because it tends to interfere with headers |
| 120 |
dnl AC_C_INLINE |
| 121 |
dnl AC_TYPE_OFF_T |
| 122 |
-AC_TYPE_TIME_T |
| 123 |
-AC_HEADER_TIME |
| 124 |
-dnl AC_TYPE_UMODE_T |
| 125 |
-AC_STRUCT_TM |
| 126 |
-AC_STRUCT_TIMEZONE |
| 127 |
+AC_CHECK_HEADERS_ONCE([sys/time.h]) |
| 128 |
+ |
| 129 |
dnl AC_CHECK_SIZEOF(long, 4) dnl -- Make sure to warn user |
| 130 |
dnl AC_CHECK_SIZEOF(int, 4) dnl -- about these defaults. |
| 131 |
|
| 132 |
@@ -61,7 +56,8 @@ PKG_CHECK_MODULES([CAIRO],[cairo]) |
| 133 |
|
| 134 |
AC_SUBST(XO_PATH) |
| 135 |
AC_SUBST(CFLAGS_W) |
| 136 |
-AC_OUTPUT(Makefile) |
| 137 |
+AC_CONFIG_FILES([Makefile]) |
| 138 |
+AC_OUTPUT |
| 139 |
|
| 140 |
dnl -- Prevent accidental edits. |
| 141 |
chmod -w Makefile |
| 142 |
diff --git a/standard.h b/standard.h |
| 143 |
index e24cfcf..8460b9f 100644 |
| 144 |
--- a/standard.h |
| 145 |
+++ b/standard.h |
| 146 |
@@ -39,10 +39,8 @@ |
| 147 |
#if defined (HAVE_UNISTD_H) |
| 148 |
# include <unistd.h> |
| 149 |
#endif |
| 150 |
-#if defined (STDC_HEADERS) |
| 151 |
-# include <stdio.h> |
| 152 |
-# include <stdlib.h> |
| 153 |
-#endif |
| 154 |
+#include <stdio.h> |
| 155 |
+#include <stdlib.h> |
| 156 |
|
| 157 |
#include "assert.h" |
| 158 |
//#include "dmalloc.h" |
| 159 |
diff --git a/xo/Makefile.in b/xo/Makefile.in |
| 160 |
index dead45e..8a9ef82 100644 |
| 161 |
--- a/xo/Makefile.in |
| 162 |
+++ b/xo/Makefile.in |
| 163 |
@@ -56,7 +56,7 @@ OBJ_LIB=$(_OBJ_LIB:.y=.o) |
| 164 |
VERSION_HEADER=version.h |
| 165 |
|
| 166 |
CC=@CXX@ |
| 167 |
-CXXFLAGS=@CXXFLAGS@ |
| 168 |
+CXXFLAGS=@CPPFLAGS@ @CXXFLAGS@ |
| 169 |
#CXXFLAGS=-${CXXFLAGS} -O |
| 170 |
#CXXFLAGS=-${CXXFLAGS} -O2 |
| 171 |
#CXXFLAGS=-${CXXFLAGS} -fomit-frame-pointer |
| 172 |
@@ -76,6 +76,7 @@ exec_prefix = @exec_prefix@ |
| 173 |
bindir = @bindir@ |
| 174 |
infodir = @infodir@ |
| 175 |
mandir = @mandir@ |
| 176 |
+datarootdir = @datarootdir@ |
| 177 |
|
| 178 |
# |
| 179 |
# --- Implicit rules |
| 180 |
diff --git a/xo/configure.in b/xo/configure.in |
| 181 |
index d96bebb..f82b6c1 100644 |
| 182 |
--- a/xo/configure.in |
| 183 |
+++ b/xo/configure.in |
| 184 |
@@ -1,15 +1,15 @@ |
| 185 |
dnl Process this file with autoconf to produce a configure script. |
| 186 |
-AC_REVISION([$Id: configure.in,v 1.5 2000/01/13 07:04:46 elf Exp $]) |
| 187 |
-AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. |
| 188 |
-AC_INIT(ldisplay.cxx) dnl Name of unique file that must exist |
| 189 |
+AC_PREREQ([2.71])dnl dnl Minimum Autoconf version required. |
| 190 |
+AC_INIT |
| 191 |
+AC_CONFIG_SRCDIR([ldisplay.cxx]) dnl Name of unique file that must exist |
| 192 |
|
| 193 |
-AC_CONFIG_HEADER(config.h) |
| 194 |
+AC_CONFIG_HEADERS([config.h]) |
| 195 |
|
| 196 |
-AC_LANG_CPLUSPLUS dnl Default to c++ cause that what we done. |
| 197 |
+AC_LANG([C++]) dnl Default to c++ cause that what we done. |
| 198 |
|
| 199 |
dnl Checks for programs. |
| 200 |
AC_PROG_YACC |
| 201 |
-AC_PROG_LEX |
| 202 |
+AC_PROG_LEX([noyywrap]) |
| 203 |
AC_PROG_CXX |
| 204 |
AC_PROG_LN_S |
| 205 |
|
| 206 |
@@ -20,8 +20,6 @@ fi |
| 207 |
|
| 208 |
dnl Checks for header files. |
| 209 |
AC_PATH_XTRA |
| 210 |
-AC_HEADER_STDC |
| 211 |
-AC_CHECK_FUNCS(memset strncmp) |
| 212 |
AC_CHECK_HEADERS(memory.h fcntl.h limits.h unistd.h) |
| 213 |
|
| 214 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 215 |
@@ -30,7 +28,6 @@ dnl AC_C_CONST |
| 216 |
dnl -- Removed because it tends to interfere with headers |
| 217 |
dnl AC_C_INLINE |
| 218 |
AC_TYPE_SIZE_T |
| 219 |
-AC_HEADER_TIME |
| 220 |
|
| 221 |
dnl Checks for library functions. |
| 222 |
dnl AC_FUNC_MMAP |
| 223 |
@@ -38,7 +35,8 @@ dnl AC_FUNC_VPRINTF dnl -- We use vsprintf |
| 224 |
|
| 225 |
|
| 226 |
AC_SUBST(CFLAGS_W) |
| 227 |
-AC_OUTPUT(Makefile) |
| 228 |
+AC_CONFIG_FILES([Makefile]) |
| 229 |
+AC_OUTPUT |
| 230 |
|
| 231 |
dnl -- Prevent accidental edits. |
| 232 |
chmod -w Makefile |
| 233 |
diff --git a/xo/standard.h b/xo/standard.h |
| 234 |
index 634c31f..2b06c53 100644 |
| 235 |
--- a/xo/standard.h |
| 236 |
+++ b/xo/standard.h |
| 237 |
@@ -37,11 +37,9 @@ |
| 238 |
|
| 239 |
#include "config.h" // autoconf configuration header |
| 240 |
|
| 241 |
-#if defined (STDC_HEADERS) |
| 242 |
-# include <stdio.h> |
| 243 |
-# include <stdlib.h> |
| 244 |
-# include <stdarg.h> |
| 245 |
-#endif |
| 246 |
+#include <stdio.h> |
| 247 |
+#include <stdlib.h> |
| 248 |
+#include <stdarg.h> |
| 249 |
#if defined (HAVE_UNISTD_H) |
| 250 |
# include <unistd.h> |
| 251 |
#endif |