1: #
2: # $Id: configure.ac,v 1.7 2025/03/15 03:19: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.7 2025/03/15 03:19:33 snw
28: # Fix broken build and update to 0.62.1
29: #
30: # Revision 1.6 2025/03/15 02:26:35 snw
31: # Prepare for 0.62.1 release
32: #
33: # Revision 1.5 2025/03/09 19:14:24 snw
34: # First phase of REUSE compliance and header reformat
35: #
36: #
37: # SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
38: # SPDX-License-Identifier: AGPL-3.0-or-later
39:
40:
41: AC_INIT([freem],[0.62.1],[snw@coherent-logic.com])
42: AC_CONFIG_HEADERS([src/config.h])
43: AC_CONFIG_MACRO_DIR([m4])
44:
45: AX_LIB_READLINE
46:
47: # check for libm
48: AC_CHECK_LIB([m], [powf])
49: AC_CHECK_LIB([m], [pow])
50:
51: AC_CANONICAL_HOST
52:
53: # find out if we need to link with -lsocket and/or -lnsl to get
54: # BSD sockets support
55:
56: AU_ALIAS([LIB_SOCKET_NSL], [AX_LIB_SOCKET_NSL])
57:
58: AC_DEFUN([AX_LIB_SOCKET_NSL],
59: [
60: AC_SEARCH_LIBS([gethostbyname], [nsl])
61: AC_SEARCH_LIBS([socket], [socket], [], [
62: AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
63: [], [-lnsl])])
64: ])
65:
66: AX_LIB_SOCKET_NSL
67:
68: #
69: # check for getopt.h and getopt_long
70: #
71: AC_CHECK_HEADERS(getopt.h)
72: AC_CHECK_FUNCS([getopt_long])
73:
74: #
75: # bring in X11, X Toolkit, and Motif if --enable-mwapi is passed to configure
76: #
77: AC_ARG_ENABLE([mwapi], AS_HELP_STRING([--enable-mwapi], [Enable MWAPI (OSF/Motif) support (EXPERIMENTAL)]))
78:
79: AS_IF([test "x$enable_mwapi" = "xyes"], [
80: AX_LIB_MOTIF
81: ])
82:
83: # check for wiringPi headers and library linkage for
84: # ^$ZRPI ssv on Raspberry Pi SBCs
85: AC_CHECK_HEADERS(wiringPi.h)
86:
87: AC_DEFUN([AX_LIB_WIRINGPI],
88: [
89: AC_SEARCH_LIBS([wiringPiSetup], [wiringPi], [], [
90: AC_CHECK_LIB([wiringPi], [wiringPiSetup], [LIBS="-lwiringPi $LIBS"],
91: [], [-lwiringPi])])
92: ])
93:
94: AX_LIB_WIRINGPI
95:
96: AC_ENABLE_SHARED
97: AC_DISABLE_STATIC
98: LT_INIT
99: AM_INIT_AUTOMAKE
100: AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
101: AC_PROG_CC
102: # AC_PATH_XTRA
103: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>