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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# Generic support for FLTK applications
AC_COPYRIGHT([Copyright (C) 2016 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)])
AC_PREREQ([2.63])
dnl major and minor must be integers; patch may
dnl contain other characters or be empty
m4_define(FLMSG_MAJOR, [4])
m4_define(FLMSG_MINOR, [0])
m4_define(FLMSG_PATCH, [.17])
AC_INIT([FLMSG], FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH, [w1hkj AT w1hkj DOT com])
AC_SUBST([FLMSG_VERSION_MAJOR], [FLMSG_MAJOR])
AC_SUBST([FLMSG_VERSION_MINOR], [FLMSG_MINOR])
AC_SUBST([FLMSG_VERSION_PATCH], [FLMSG_PATCH])
AC_SUBST([FLMSG_VERSION], [FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH])
AC_DEFINE([FLMSG_VERSION_MAJOR], [FLMSG_MAJOR], [major version number])
AC_DEFINE([FLMSG_VERSION_MINOR], [FLMSG_MINOR], [minor version number])
AC_DEFINE([FLMSG_VERSION_PATCH], ["FLMSG_PATCH"], [patch/alpha version string])
AC_DEFINE([FLMSG_VERSION], ["FLMSG_MAJOR.FLMSG_MINOR[]FLMSG_PATCH"], [version string])
AC_SUBST([AC_CONFIG_ARGS], [$ac_configure_args])
AC_CONFIG_AUX_DIR([build-aux])
# define build, build_cpu, build_vendor, build_os
AC_CANONICAL_BUILD
# define host, host_cpu, host_vendor, host_os
AC_CANONICAL_HOST
# define target, target_cpu, target_vendor, target_os
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign std-options subdir-objects 1.9.6])
#change the next config item for the specific application src's
AC_CONFIG_SRCDIR([src/flmsg.cxx])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf])
### static flag
# Set ac_cv_static to yes/no
# Substitute RTLIB in Makefile
AC_FL_STATIC
### optimizations
# Set ac_cv_opt to arg
# Substitute OPT_FLAGS in Makefile
AC_FL_OPT
### debug flag
# Set ac_cv_debug to yes/no
# Override CXXFLAGS
# Set ENABLE_DEBUG Makefile conditional
# Substitute RDYNAMIC in Makefile
AC_FL_DEBUG
###### OS support
### OSX
# Set ac_cv_mac_universal to yes/no
# Set DARWIN Makefile conditional
# Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile
AC_FL_MACOSX
### win32
# Set WIN32 Makefile conditional
# Set HAVE_WINDRES Makefile conditional
# Substitute WINDRES in Makefile
AC_FL_WIN32
### Non-POSIX compatibility (i.e. mingw32)
# Sets various Makefile conditionals; see m4/np-compat.m4
AC_FLMSG_NP_COMPAT
### FLTK
# Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile
# Set FLUID variable
# Set HAVE_FLUID Makefile conditional
AC_CHECK_FLTK
### X11
# Set ac_cv_x to yes/no
# Define USE_X in config.h
# Substitute X_CFLAGS and X_LIBS in Makefile
if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then
AC_FLMSG_PKG_CHECK([x], [x11], [no], [yes])
fi
### libflxmlrpc
# Set ac_cv_flxmlrpc to yes/no
# Define USE_FLXMLRPC in config.h
# Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile
AC_FLMSG_PKG_CHECK([flxmlrpc], [flxmlrpc >= 0.1.0],
[yes], [yes], [use external flxmlrpc library @<:@autodetect@:>@],
[ENABLE_FLXMLRPC])
### build info
# Define various build variables in config.h
AC_FLMSG_BUILD_INFO
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT
ac_xmlrpc_report="internal lib";
if test "x$ac_cv_flxmlrpc" = "xyes"; then
ac_xmlrpc_report="external lib";
fi
### summary
AC_MSG_RESULT([
Configuration summary:
Version ..................... $VERSION
Target OS ................... $target_os
Have flxmlrpc library ....... $ac_xmlrpc_report
Static linking .............. $ac_cv_static
CPU optimizations ........... $ac_cv_opt
Debugging ................... $ac_cv_debug
])
|