configure.ac 2.66 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#
#                            *
#                           * *
#                          *   *
#                     ***************
#                      * *       * *
#                       *  MUMPS  *
#                      * *       * *
#                     ***************
#                          *   *
#                           * *
#                            *
#
#   configure.ac
#    autoconf rules for FreeM
#
#  
#   Author: John P. Willis <jpw@coherent-logic.com>
#    Copyright (C) 1998 MUG Deutschland
#    Copyright (C) 2020 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/>.
#
#

40
AC_INIT(freem, 0.28.1, jpw@coherent-logic.com)
John P. Willis's avatar
John P. Willis committed
41
AC_CONFIG_HEADERS([src/config.h])
42 43 44 45 46
#AC_CHECK_LIB([readline], [readline])
#AC_CHECK_LIB([readline], [history_list])
#AC_CHECK_HEADERS(readline.h readline/readline.h)
#AC_CHECK_HEADERS(history.h readline/history.h)
AX_LIB_READLINE
47

48 49 50
# check for libm
AC_CHECK_LIB([m], [powf])

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

54
AU_ALIAS([LIB_SOCKET_NSL], [AX_LIB_SOCKET_NSL])
55

56 57 58 59 60 61 62
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])])
])
63

64
AX_LIB_SOCKET_NSL
65 66 67 68 69 70 71 72 73 74 75

# 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])])
76
])
77 78 79

AX_LIB_WIRINGPI

80 81
#AC_ARG_ENABLE([forcefixed],
#        AS_HELP_STRING([--enable-forcefixed], [Force fixed-point math support]))
82

83 84 85
#AS_IF([test "x$enable_forcefixed" = "xyes"], [
#        AC_DEFINE([FORCE_FIXED], [1], [Define if --enable-force-fixed is set])
#])
86

87 88
AC_ENABLE_SHARED
AC_DISABLE_STATIC
John P. Willis's avatar
John P. Willis committed
89
AC_PROG_LIBTOOL
90
AM_INIT_AUTOMAKE
John P. Willis's avatar
John P. Willis committed
91
AC_CONFIG_FILES(Makefile src/Makefile doc/Makefile etc/Makefile)
John P. Willis's avatar
John P. Willis committed
92
AC_PROG_CC
John P. Willis's avatar
John P. Willis committed
93
AC_OUTPUT