1: #
2: # $Id: configure.ac,v 1.25 2025/04/09 21:10:14 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.25 2025/04/09 21:10:14 snw
28: # Only use -Wno-format-truncation et al when the compiler supports them
29: #
30: # Revision 1.24 2025/04/09 20:06:02 snw
31: # Add macros to check for compiler flags to suppress unavoidable warnings
32: #
33: # Revision 1.23 2025/04/07 23:40:30 snw
34: # Move to 0.64.0-rc0 and prepare to optimize global file lookup
35: #
36: # Revision 1.22 2025/04/07 21:19:38 snw
37: # Release FreeM 0.64.0-rc0
38: #
39: # Revision 1.21 2025/04/04 18:00:00 snw
40: # *** empty log message ***
41: #
42: # Revision 1.20 2025/04/04 12:46:13 snw
43: # Patch Solaris 8 crash and bump version to 0.64.0-rc0
44: #
45: # Revision 1.19 2025/04/04 02:40:32 snw
46: # Release 0.64.0-rc0
47: #
48: # Revision 1.18 2025/04/04 02:12:24 snw
49: # Bump to 0.64.0-rc0 and make sure m_log function is never empty
50: #
51: # Revision 1.17 2025/04/04 01:18:20 snw
52: # Remove vestigial logging code and bump to 0.64.0-rc0
53: #
54: # Revision 1.16 2025/04/03 20:48:14 snw
55: # Improve daemon error diagnostics and bump to 0.64.0-rc0
56: #
57: # Revision 1.15 2025/04/03 15:51:17 snw
58: # Add fmadm man page and apply minor updates to freem man page
59: #
60: # Revision 1.14 2025/04/03 01:41:01 snw
61: # New features frozen; prepare 0.64.0-rc0
62: #
63: # Revision 1.13 2025/03/30 01:36:58 snw
64: # Make it easier to bring back fma_gedit, fix double-free in global handler, limit $CHAR to 7-bit ASCII
65: #
66: # Revision 1.12 2025/03/29 16:50:42 snw
67: # Back to 0.64.0-rc0 as version for development; temp fix for double-free issue in global_dispatch
68: #
69: # Revision 1.11 2025/03/27 03:31:16 snw
70: # Prepare for release of FreeM 0.64.0-rc0
71: #
72: # Revision 1.10 2025/03/23 19:42:18 snw
73: # Back to 0.64.0-rc0 versioning for continued development work
74: #
75: # Revision 1.9 2025/03/23 04:42:33 snw
76: # Prepare for release of FreeM 0.64.0-rc0
77: #
78: # Revision 1.8 2025/03/16 16:08:26 snw
79: # Back on 0.64.0-rc0 versioning for continued development
80: #
81: # Revision 1.7 2025/03/15 03:19:33 snw
82: # Fix broken build and update to 0.64.0-rc0
83: #
84: # Revision 1.6 2025/03/15 02:26:35 snw
85: # Prepare for 0.64.0-rc0 release
86: #
87: # Revision 1.5 2025/03/09 19:14:24 snw
88: # First phase of REUSE compliance and header reformat
89: #
90: #
91: # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
92: # SPDX-License-Identifier: AGPL-3.0-or-later
93:
94:
95: AC_INIT([freem],[0.64.0-rc0],[snw@coherent-logic.com])
96: AC_CONFIG_HEADERS([src/config.h])
97: AC_CONFIG_MACRO_DIR([m4])
98:
99: AX_LIB_READLINE
100: AX_CHECK_COMPILE_FLAG([-Wno-format-truncation], [AX_APPEND_FLAG([-Wno-format-truncation])])
101: AX_CHECK_COMPILE_FLAG([-Wno-format-contains-nul], [AX_APPEND_FLAG([-Wno-format-contains-nul])])
102:
103: # check for libm
104: AC_CHECK_LIB([m], [powf])
105: AC_CHECK_LIB([m], [pow])
106:
107: AC_CANONICAL_HOST
108: #AX_WITH_CURSES
109:
110: # find out if we need to link with -lsocket and/or -lnsl to get
111: # BSD sockets support
112:
113: AU_ALIAS([LIB_SOCKET_NSL], [AX_LIB_SOCKET_NSL])
114:
115: AC_DEFUN([AX_LIB_SOCKET_NSL],
116: [
117: AC_SEARCH_LIBS([gethostbyname], [nsl])
118: AC_SEARCH_LIBS([socket], [socket], [], [
119: AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
120: [], [-lnsl])])
121: ])
122:
123: AX_LIB_SOCKET_NSL
124:
125: #
126: # check for getopt.h and getopt_long
127: #
128: AC_CHECK_HEADERS(getopt.h)
129: AC_CHECK_FUNCS([getopt_long])
130:
131: #
132: # bring in X11, X Toolkit, and Motif if --enable-mwapi is passed to configure
133: #
134: AC_ARG_ENABLE([mwapi], AS_HELP_STRING([--enable-mwapi], [Enable MWAPI (OSF/Motif) support (EXPERIMENTAL)]))
135:
136: AS_IF([test "x$enable_mwapi" = "xyes"], [
137: AX_LIB_MOTIF
138: ])
139:
140: # check for wiringPi headers and library linkage for
141: # ^$ZRPI ssv on Raspberry Pi SBCs
142: AC_CHECK_HEADERS(wiringPi.h)
143:
144: AC_DEFUN([AX_LIB_WIRINGPI],
145: [
146: AC_SEARCH_LIBS([wiringPiSetup], [wiringPi], [], [
147: AC_CHECK_LIB([wiringPi], [wiringPiSetup], [LIBS="-lwiringPi $LIBS"],
148: [], [-lwiringPi])])
149: ])
150:
151: AX_LIB_WIRINGPI
152:
153: AC_ENABLE_SHARED
154: AC_DISABLE_STATIC
155: LT_INIT
156: AM_INIT_AUTOMAKE
157: AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
158: AC_PROG_CC
159: # AC_PATH_XTRA
160: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>