File:  [Coherent Logic Development] / freem / configure.ac
Revision 1.11: download - view: text, annotated - select for diffs
Thu Mar 27 03:31:16 2025 UTC (4 days, 6 hours ago) by snw
Branches: MAIN
CVS tags: v0-62-3, HEAD
Prepare for release of FreeM 0.62.3

#
#   $Id: configure.ac,v 1.11 2025/03/27 03:31:16 snw Exp $
#    autoconf rules for FreeM
#
#  
#   Author: Serena Willis <jpw@coherent-logic.com>
#    Copyright (C) 1998 MUG Deutschland
#    Copyright (C) 2020, 2025 Coherent Logic Development LLC
#
#
#   This file is part of FreeM.
#
#   FreeM is free software: you can redistribute it and/or modify
#   it under the terms of the GNU Affero Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   FreeM is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU Affero Public License for more details.
#
#   You should have received a copy of the GNU Affero Public License
#   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
#
#   $Log: configure.ac,v $
#   Revision 1.11  2025/03/27 03:31:16  snw
#   Prepare for release of FreeM 0.62.3
#
#   Revision 1.10  2025/03/23 19:42:18  snw
#   Back to 0.62.3 versioning for continued development work
#
#   Revision 1.9  2025/03/23 04:42:33  snw
#   Prepare for release of FreeM 0.62.3
#
#   Revision 1.8  2025/03/16 16:08:26  snw
#   Back on 0.62.3 versioning for continued development
#
#   Revision 1.7  2025/03/15 03:19:33  snw
#   Fix broken build and update to 0.62.3
#
#   Revision 1.6  2025/03/15 02:26:35  snw
#   Prepare for 0.62.3 release
#
#   Revision 1.5  2025/03/09 19:14:24  snw
#   First phase of REUSE compliance and header reformat
#
#
# SPDX-FileCopyrightText:  (C) 2025 Coherent Logic Development LLC
# SPDX-License-Identifier: AGPL-3.0-or-later


AC_INIT([freem],[0.62.3],[snw@coherent-logic.com])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])

AX_LIB_READLINE

# check for libm
AC_CHECK_LIB([m], [powf])
AC_CHECK_LIB([m], [pow])

AC_CANONICAL_HOST

# find out if we need to link with -lsocket and/or -lnsl to get
# BSD sockets support

AU_ALIAS([LIB_SOCKET_NSL], [AX_LIB_SOCKET_NSL])

AC_DEFUN([AX_LIB_SOCKET_NSL],
[
        AC_SEARCH_LIBS([gethostbyname], [nsl])
        AC_SEARCH_LIBS([socket], [socket], [], [
                AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
                [], [-lnsl])])
])

AX_LIB_SOCKET_NSL

#
# check for getopt.h and getopt_long
#
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_FUNCS([getopt_long])

#
# bring in X11, X Toolkit, and Motif if --enable-mwapi is passed to configure
#
AC_ARG_ENABLE([mwapi],  AS_HELP_STRING([--enable-mwapi], [Enable MWAPI (OSF/Motif) support (EXPERIMENTAL)]))

AS_IF([test "x$enable_mwapi" = "xyes"], [
  AX_LIB_MOTIF
]) 

# check for wiringPi headers and library linkage for
# ^$ZRPI ssv on Raspberry Pi SBCs
AC_CHECK_HEADERS(wiringPi.h)

AC_DEFUN([AX_LIB_WIRINGPI],
[
        AC_SEARCH_LIBS([wiringPiSetup], [wiringPi], [], [
                AC_CHECK_LIB([wiringPi], [wiringPiSetup], [LIBS="-lwiringPi $LIBS"],
                [], [-lwiringPi])])
])

AX_LIB_WIRINGPI

AC_ENABLE_SHARED
AC_DISABLE_STATIC
LT_INIT
AM_INIT_AUTOMAKE
AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile)
AC_PROG_CC
# AC_PATH_XTRA
AC_OUTPUT

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>