1: #
2: # $Id: configure.ac,v 1.39 2025/05/19 13:14:33 snw Exp $
3: # autoconf rules for FreeM
4: #
5: #
6: # Author: Serena Willis <jpw@coherent-logic.com>
7: # Copyright (C) 1998 MUG Deutschland
8: # Copyright (C) 2020, 2025 Coherent Logic Development LLC
9: #
10: #
11: # This file is part of FreeM.
12: #
13: # FreeM is free software: you can redistribute it and/or modify
14: # it under the terms of the GNU Affero Public License as published by
15: # the Free Software Foundation, either version 3 of the License, or
16: # (at your option) any later version.
17: #
18: # FreeM is distributed in the hope that it will be useful,
19: # but WITHOUT ANY WARRANTY; without even the implied warranty of
20: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: # GNU Affero Public License for more details.
22: #
23: # You should have received a copy of the GNU Affero Public License
24: # along with FreeM. If not, see <https://www.gnu.org/licenses/>.
25: #
26: # $Log: configure.ac,v $
27: # Revision 1.39 2025/05/19 13:14:33 snw
28: # Bump version
29: #
30: # Revision 1.38 2025/05/17 17:00:04 snw
31: # Make it possible to select the modernized global handler with the configure script and update documentation and README.md
32: #
33: # Revision 1.37 2025/05/16 13:22:57 snw
34: # Bump version to account for shared memory changes
35: #
36: # Revision 1.36 2025/05/14 12:22:03 snw
37: # Further work on shared memory
38: #
39: # Revision 1.35 2025/05/08 12:52:52 snw
40: # Begin development on 0.65.0
41: #
42: # Revision 1.34 2025/05/07 19:03:05 snw
43: # Release 0.65.1-rc1, prepare to begin shared memory rewrite
44: #
45: # Revision 1.33 2025/04/19 01:10:04 snw
46: # Update documentation
47: #
48: # Revision 1.32 2025/04/15 03:42:30 snw
49: # Remove -fno-stack-protector to fix dynamic executable builds on SunCC on Solaris
50: #
51: # Revision 1.31 2025/04/15 03:37:30 snw
52: # Remove -fno-mudflap to fix Solaris builds
53: #
54: # Revision 1.30 2025/04/12 00:54:16 snw
55: # Set -fno-stack-protector and -fno-mudflap where available, and set _FORTIFY_SOURCE to 0 everywhere
56: #
57: # Revision 1.29 2025/04/12 00:42:05 snw
58: # Remove -Wall and all supporting directives
59: #
60: # Revision 1.28 2025/04/11 20:55:47 snw
61: # Disable -Wunused-result where possible
62: #
63: # Revision 1.27 2025/04/10 18:01:34 snw
64: # Further tweaks to the autoconf configuration
65: #
66: # Revision 1.26 2025/04/10 01:24:38 snw
67: # Remove C++ style comments
68: #
69: # Revision 1.25 2025/04/09 21:10:14 snw
70: # Only use -Wno-format-truncation et al when the compiler supports them
71: #
72: # Revision 1.24 2025/04/09 20:06:02 snw
73: # Add macros to check for compiler flags to suppress unavoidable warnings
74: #
75: # Revision 1.23 2025/04/07 23:40:30 snw
76: # Move to 0.65.1-rc1 and prepare to optimize global file lookup
77: #
78: # Revision 1.22 2025/04/07 21:19:38 snw
79: # Release FreeM 0.65.1-rc1
80: #
81: # Revision 1.21 2025/04/04 18:00:00 snw
82: # *** empty log message ***
83: #
84: # Revision 1.20 2025/04/04 12:46:13 snw
85: # Patch Solaris 8 crash and bump version to 0.65.1-rc1
86: #
87: # Revision 1.19 2025/04/04 02:40:32 snw
88: # Release 0.65.1-rc1
89: #
90: # Revision 1.18 2025/04/04 02:12:24 snw
91: # Bump to 0.65.1-rc1 and make sure m_log function is never empty
92: #
93: # Revision 1.17 2025/04/04 01:18:20 snw
94: # Remove vestigial logging code and bump to 0.65.1-rc1
95: #
96: # Revision 1.16 2025/04/03 20:48:14 snw
97: # Improve daemon error diagnostics and bump to 0.65.1-rc1
98: #
99: # Revision 1.15 2025/04/03 15:51:17 snw
100: # Add fmadm man page and apply minor updates to freem man page
101: #
102: # Revision 1.14 2025/04/03 01:41:01 snw
103: # New features frozen; prepare 0.65.1-rc1
104: #
105: # Revision 1.13 2025/03/30 01:36:58 snw
106: # Make it easier to bring back fma_gedit, fix double-free in global handler, limit $CHAR to 7-bit ASCII
107: #
108: # Revision 1.12 2025/03/29 16:50:42 snw
109: # Back to 0.65.1-rc1 as version for development; temp fix for double-free issue in global_dispatch
110: #
111: # Revision 1.11 2025/03/27 03:31:16 snw
112: # Prepare for release of FreeM 0.65.1-rc1
113: #
114: # Revision 1.10 2025/03/23 19:42:18 snw
115: # Back to 0.65.1-rc1 versioning for continued development work
116: #
117: # Revision 1.9 2025/03/23 04:42:33 snw
118: # Prepare for release of FreeM 0.65.1-rc1
119: #
120: # Revision 1.8 2025/03/16 16:08:26 snw
121: # Back on 0.65.1-rc1 versioning for continued development
122: #
123: # Revision 1.7 2025/03/15 03:19:33 snw
124: # Fix broken build and update to 0.65.1-rc1
125: #
126: # Revision 1.6 2025/03/15 02:26:35 snw
127: # Prepare for 0.65.1-rc1 release
128: #
129: # Revision 1.5 2025/03/09 19:14:24 snw
130: # First phase of REUSE compliance and header reformat
131: #
132: #
133: # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
134: # SPDX-License-Identifier: AGPL-3.0-or-later
135:
136:
137: AC_INIT([freem],[0.65.1-rc1],[snw@coherent-logic.com])
138: AC_CONFIG_HEADERS([src/config.h])
139: AC_CONFIG_MACRO_DIR([m4])
140:
141: AX_LIB_READLINE
142: ##
143: # The following may be needed once we get back to enabling -Wall -Wextra -pedantic
144: #
145: # AX_CHECK_COMPILE_FLAG([-Wno-format-truncation], [AX_APPEND_FLAG([-Wno-format-truncation])])
146: # AX_CHECK_COMPILE_FLAG([-Wno-format-contains-nul], [AX_APPEND_FLAG([-Wno-format-contains-nul])])
147: # AX_CHECK_COMPILE_FLAG([-Wno-stringop-truncation], [AX_APPEND_FLAG([-Wno-stringop-truncation])])
148: # AX_CHECK_COMPILE_FLAG([-Wno-parentheses], [AX_APPEND_FLAG([-Wno-parentheses])])
149: # AX_CHECK_COMPILE_FLAG([-Wno-pointer-sign], [AX_APPEND_FLAG([-Wno-pointer-sign])])
150: # AX_CHECK_COMPILE_FLAG([-fstack-protector], [AX_APPEND_FLAG([-fstack-protector])])
151:
152: # check for libm
153: AC_CHECK_LIB([m], [powf])
154: AC_CHECK_LIB([m], [pow])
155:
156: AC_CANONICAL_HOST
157: #AX_WITH_CURSES
158:
159: # find out if we need to link with -lsocket and/or -lnsl to get
160: # BSD sockets support
161:
162: AU_ALIAS([LIB_SOCKET_NSL], [AX_LIB_SOCKET_NSL])
163:
164: AC_DEFUN([AX_LIB_SOCKET_NSL],
165: [
166: AC_SEARCH_LIBS([gethostbyname], [nsl])
167: AC_SEARCH_LIBS([socket], [socket], [], [
168: AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
169: [], [-lnsl])])
170: ])
171:
172: AX_LIB_SOCKET_NSL
173:
174: #
175: # check for getopt.h and getopt_long
176: #
177: AC_CHECK_HEADERS(getopt.h)
178: AC_CHECK_FUNCS([getopt_long])
179:
180: #
181: # bring in X11, X Toolkit, and Motif if --enable-mwapi is passed to configure
182: #
183: AC_ARG_ENABLE([mwapi], AS_HELP_STRING([--enable-mwapi], [Enable MWAPI (OSF/Motif) support (EXPERIMENTAL)]))
184:
185: AS_IF([test "x$enable_mwapi" = "xyes"], [
186: AX_LIB_MOTIF
187: ])
188:
189: #
190: # enable new global handler
191: #
192: AC_ARG_ENABLE([newglobals], AS_HELP_STRING([--enable-newglobals], [Enable modernized global handler (EXPERIMENTAL)]))
193:
194: AM_CONDITIONAL([USE_NEWGLOBALS], [test "x$enable_newglobals" = "xyes"])
195:
196: AS_IF([test "x$enable_newglobals" = "xyes"], [
197: AC_DEFINE(USE_NEW_GLOBALS, 1, [Define if using new global handler])
198: ])
199:
200: # check for wiringPi headers and library linkage for
201: # ^$ZRPI ssv on Raspberry Pi SBCs
202: AC_CHECK_HEADERS(wiringPi.h)
203:
204: AC_DEFUN([AX_LIB_WIRINGPI],
205: [
206: AC_SEARCH_LIBS([wiringPiSetup], [wiringPi], [], [
207: AC_CHECK_LIB([wiringPi], [wiringPiSetup], [LIBS="-lwiringPi $LIBS"],
208: [], [-lwiringPi])])
209: ])
210:
211: AX_LIB_WIRINGPI
212:
213: AC_ENABLE_SHARED
214: AC_DISABLE_STATIC
215: LT_INIT
216: AM_INIT_AUTOMAKE
217: AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
218: AC_PROG_CC
219: # AC_PATH_XTRA
220: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>