2009-06-03 18:21:48 +00:00
|
|
|
## Process this file with autoconf to create configure. -*- autoconf -*-
|
|
|
|
|
2012-02-04 04:09:45 +00:00
|
|
|
dnl Autoconf 2.67 is in Debian Squeeze--is an older version needed
|
|
|
|
dnl for some other distribution?
|
|
|
|
## FIXME: Is this too new? ##
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_PREREQ([2.67])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
## ------------------------ ##
|
|
|
|
## Autoconf initialisation. ##
|
|
|
|
## ------------------------ ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2011-12-08 03:20:00 +00:00
|
|
|
dnl Please do not use '-' in the version number, as package managers will fail,
|
2011-06-10 22:11:23 +00:00
|
|
|
dnl however, the use of '~' should be fine as apt (others?) will treat
|
|
|
|
dnl it as an earlier version than the actual release. TNX KA6MAL
|
|
|
|
dnl PACKAGE_NAME + " " + PACKAGE_VERSION must not exceed 20 chars!
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_INIT([Hamlib],
|
2018-08-06 02:11:00 +00:00
|
|
|
[4.0~git],
|
2012-09-27 19:22:07 +00:00
|
|
|
[hamlib-developer@lists.sourceforge.net],
|
|
|
|
[hamlib],
|
|
|
|
[http://www.hamlib.org])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
AC_CONFIG_SRCDIR([include/hamlib/rig.h])
|
2011-02-13 19:01:28 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([macros])
|
2012-10-07 13:31:10 +00:00
|
|
|
AC_CONFIG_HEADERS([include/config.h])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-10-12 03:23:37 +00:00
|
|
|
dnl Place build system provided programs in this directory.
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
## ------------------------ ##
|
|
|
|
## Automake Initialisation. ##
|
|
|
|
## ------------------------ ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2012-02-04 04:09:45 +00:00
|
|
|
dnl Passing AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION to AM_INIT_AUTOMAKE is
|
|
|
|
dnl obsolete as these values are obtained from the AC_INIT macro.
|
2013-09-16 00:47:49 +00:00
|
|
|
AM_INIT_AUTOMAKE([-Wall subdir-objects])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
dnl Clean compilation output makes compiler warnings more visible
|
2011-05-22 21:20:12 +00:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
## ------------------------------ ##
|
|
|
|
## Hamlib specific configuration. ##
|
|
|
|
## ------------------------------ ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
dnl New backends must be listed here! Also the new Makefile path must be
|
|
|
|
dnl added to AC_CONFIG_FILES near the end of this file. See README.developer
|
2013-12-11 02:14:22 +00:00
|
|
|
dnl Beware of duplication should a backend directory include both rig and
|
|
|
|
dnl rotor definitions, e.g. "dummy". Optional backends will not be listed
|
|
|
|
dnl here but will be added later, e.g. "winradio".
|
2018-08-21 04:46:33 +00:00
|
|
|
BACKEND_LIST="adat alinco aor barrett dorji drake dummy elad flexradio icom icmarine jrc kachina kenwood kit lowe pcr prm80 racal rft rs skanti tapr tentec tuner uniden wj yaesu"
|
2018-12-10 19:18:15 +00:00
|
|
|
ROT_BACKEND_LIST="amsat ars celestron cnctrk easycomm ether6 fodtrack gs232a heathkit m2 meade rotorez sartek spid ts7400 prosistel ioptron"
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2012-10-08 18:07:35 +00:00
|
|
|
dnl See README.release on setting these values
|
|
|
|
# Values given to -version-info when linking. See libtool documentation.
|
|
|
|
# Set them here to keep c++/Makefile and src/Makefile in sync.
|
2018-03-29 21:55:25 +00:00
|
|
|
ABI_VERSION=4
|
|
|
|
ABI_REVISION=0
|
|
|
|
ABI_AGE=0
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_DEFINE_UNQUOTED([ABI_VERSION], [$ABI_VERSION], [Frontend ABI version])
|
2012-10-08 18:07:35 +00:00
|
|
|
AC_DEFINE_UNQUOTED([ABI_REVISION], [$ABI_REVISION], [Frontend ABI revision])
|
|
|
|
AC_DEFINE_UNQUOTED([ABI_AGE], [$ABI_AGE], [Frontend ABI age])
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_SUBST([ABI_VERSION])
|
2012-10-08 18:07:35 +00:00
|
|
|
AC_SUBST([ABI_REVISION])
|
|
|
|
AC_SUBST([ABI_AGE])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-09-17 02:51:39 +00:00
|
|
|
# Add Hamlib define needed to link DLLs
|
|
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -DIN_HAMLIB"
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
# Add Hamlib header include paths
|
|
|
|
AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/include -I\$(top_srcdir)/src -I\$(top_srcdir)/lib"
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
## --------------- ##
|
|
|
|
## Program checks ##
|
|
|
|
## --------------- ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_PROG_AWK
|
2009-06-03 18:21:48 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
2013-05-17 10:43:17 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
# TODO: check whether CXX is functional
|
|
|
|
AC_CHECK_PROG([cf_with_cxx], ["${CXX}"], [yes], [no])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_CXX], [test x"${cf_with_cxx}" = "xyes"])
|
|
|
|
|
2013-05-17 10:43:17 +00:00
|
|
|
dnl Broke on older Automake, so test for its existence.
|
|
|
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
## ----------------------------------- ##
|
|
|
|
## Miscellaneous configuration macros ##
|
|
|
|
## ----------------------------------- ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
AC_C_INLINE
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
dnl Set warnings for compilation
|
2013-05-25 11:00:36 +00:00
|
|
|
dnl CFLAGS and CXXFLAGS are reserved for user, so set their AM_* counterparts.
|
2012-09-27 19:22:07 +00:00
|
|
|
# macros/ax_cflags_warn_all.m4
|
2013-05-25 11:00:36 +00:00
|
|
|
AX_CFLAGS_WARN_ALL([AM_CFLAGS])
|
|
|
|
AX_CXXFLAGS_WARN_ALL([AM_CXXFLAGS])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
dnl Automake macro for rigmem compilation
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
## ------------------------------------------ ##
|
|
|
|
## Various parts of Hamlib need these headers ##
|
|
|
|
## ------------------------------------------ ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2013-11-18 18:53:15 +00:00
|
|
|
AC_CHECK_HEADERS([errno.h fcntl.h getopt.h limits.h locale.h malloc.h \
|
2013-05-17 02:33:25 +00:00
|
|
|
netdb.h sgtty.h stddef.h termio.h termios.h values.h \
|
2012-11-10 14:49:44 +00:00
|
|
|
arpa/inet.h dev/ppbus/ppbconf.hdev/ppbus/ppi.h \
|
|
|
|
linux/hidraw.h linux/ioctl.h linux/parport.h linux/ppdev.h netinet/in.h \
|
2017-09-21 15:55:21 +00:00
|
|
|
sys/ioccom.h sys/ioctl.h sys/param.h sys/socket.h sys/stat.h sys/time.h \
|
|
|
|
sys/select.h glob.h ])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-05-17 02:33:25 +00:00
|
|
|
dnl set host_os variable
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
dnl ws2tcpip.h not provided by cygwin and its test causes a configure warning.
|
2013-05-18 12:31:40 +00:00
|
|
|
dnl wspiapi.h provides needed freeaddrinfo function on W2k systems.
|
2013-05-17 02:33:25 +00:00
|
|
|
AS_IF([test "${host_os}" != "cygwin"], [
|
2013-05-18 12:31:40 +00:00
|
|
|
AC_CHECK_HEADERS([ws2tcpip.h wspiapi.h])
|
2013-05-17 02:33:25 +00:00
|
|
|
])
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
## ------------------------------------ ##
|
|
|
|
## System capability and library checks ##
|
|
|
|
## ------------------------------------ ##
|
2012-10-12 03:23:37 +00:00
|
|
|
|
2012-09-26 03:29:30 +00:00
|
|
|
dnl Check for Mingw (Win32 Sleep) support
|
2012-09-27 19:22:07 +00:00
|
|
|
# macros/gr_pwin32.m4
|
2009-06-03 18:21:48 +00:00
|
|
|
GR_PWIN32
|
|
|
|
|
2013-05-25 11:00:36 +00:00
|
|
|
dnl If pthread support is found, this macro defines HAVE_PTHREAD and
|
|
|
|
dnl AC_SUBST's PTHREAD_LIBS, PTHREAD_CFLAGS, and PTHREAD_CC making those
|
|
|
|
dnl variables available in Makefiles.
|
2012-10-23 10:33:34 +00:00
|
|
|
# macros/ax_pthread.m4
|
2012-09-26 03:29:30 +00:00
|
|
|
AX_PTHREAD
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
AC_SYS_POSIX_TERMIOS()
|
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_CHECK_TYPES([siginfo_t],[],[],[[#include <signal.h>]])
|
2018-03-12 16:24:12 +00:00
|
|
|
AC_CHECK_TYPES([sig_atomic_t],[],[],[[#include <signal.h>]])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
# The following comes from SC_TCL_LINK_LIBS
|
|
|
|
# we redefine them here because we want a separate NET_LIBS var
|
|
|
|
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# On a few very rare systems, all of the libm.a stuff is
|
|
|
|
# already in libc.a. Set compiler flags accordingly.
|
|
|
|
#--------------------------------------------------------------------
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_CHECK_FUNC([sin], [MATH_LIBS=""], [MATH_LIBS="-lm"])
|
|
|
|
AC_SUBST([MATH_LIBS])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Check for the existence of the -lsocket and -lnsl libraries.
|
|
|
|
# The order here is important, so that they end up in the right
|
|
|
|
# order in the command line generated by make. Here are some
|
|
|
|
# special considerations:
|
|
|
|
# 1. Use "connect" and "accept" to check for -lsocket, and
|
|
|
|
# "gethostbyname" to check for -lnsl.
|
2012-10-07 13:31:10 +00:00
|
|
|
# 2. Use each function name only once: cannot redo a check because
|
|
|
|
# autoconf caches the results of the last check and will not redo it.
|
2009-06-03 18:21:48 +00:00
|
|
|
# 3. Use -lnsl and -lsocket only if they supply procedures that
|
2012-10-07 13:31:10 +00:00
|
|
|
# are not already present in the normal libraries. This is because
|
2009-06-03 18:21:48 +00:00
|
|
|
# IRIX 5.2 has libraries, but they aren't needed and they're
|
|
|
|
# bogus: they goof up name resolution if used.
|
|
|
|
# 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
|
|
|
|
# To get around this problem, check for both libraries together
|
|
|
|
# if -lsocket doesn't work by itself.
|
|
|
|
#--------------------------------------------------------------------
|
|
|
|
hl_checkBoth=0
|
|
|
|
hl_oldLibs=$LIBS
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
AC_CHECK_FUNC([connect], [hl_checkSocket=0], [hl_checkSocket=1])
|
|
|
|
|
|
|
|
AS_IF([test "$hl_checkSocket" = 1], [
|
|
|
|
AC_CHECK_LIB([socket],
|
|
|
|
[main],
|
|
|
|
[NET_LIBS="$NET_LIBS -lsocket"],
|
|
|
|
[hl_checkBoth=1],
|
|
|
|
[])
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test "$hl_checkBoth" = 1], [
|
|
|
|
hl2_oldLibs=$LIBS
|
|
|
|
LIBS="$LIBS -lsocket -lnsl"
|
|
|
|
AC_CHECK_FUNC([accept], [hl_checkNsl=0], [LIBS=$hl2_oldLibs])
|
|
|
|
])
|
|
|
|
|
2012-10-09 03:23:14 +00:00
|
|
|
# separate Name Service Library
|
2012-10-08 21:40:39 +00:00
|
|
|
AC_CHECK_FUNC([gethostbyname],
|
|
|
|
[],
|
2012-09-27 19:22:07 +00:00
|
|
|
[AC_CHECK_LIB([nsl],
|
|
|
|
[main],
|
|
|
|
[NET_LIBS="$NET_LIBS -lnsl"],
|
|
|
|
[],
|
|
|
|
[])
|
|
|
|
])
|
|
|
|
|
2012-10-09 03:23:14 +00:00
|
|
|
# Winsock2 32 bit
|
2012-10-08 21:40:39 +00:00
|
|
|
AC_CHECK_FUNC([gethostbyname],
|
|
|
|
[],
|
2012-09-27 19:22:07 +00:00
|
|
|
[AC_CHECK_LIB([ws2_32],
|
|
|
|
[main],
|
|
|
|
[NET_LIBS="$NET_LIBS -lws2_32"],
|
|
|
|
[],
|
|
|
|
[])
|
|
|
|
])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
LIBS="$LIBS $NET_LIBS"
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2012-10-23 10:33:34 +00:00
|
|
|
# macros/hl_getaddrinfo.m4
|
2010-04-16 20:50:14 +00:00
|
|
|
HL_GETADDRINFO
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
LIBS=$hl_oldLibs
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_SUBST([NET_LIBS])
|
|
|
|
## End Hamlib socket test ##
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
2012-11-10 14:49:44 +00:00
|
|
|
AC_CHECK_FUNCS([cfmakeraw floor getpagesize getpagesize gettimeofday inet_ntoa \
|
2017-05-22 20:51:08 +00:00
|
|
|
ioctl memchr memmove memset pow rint select setitimer setlocale sigaction signal \
|
2017-09-21 15:55:21 +00:00
|
|
|
snprintf socket sqrt strchr strdup strerror strncasecmp strrchr strstr strtol \
|
|
|
|
glob socketpair ])
|
2009-06-03 18:21:48 +00:00
|
|
|
AC_FUNC_ALLOCA
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2013-05-10 03:08:52 +00:00
|
|
|
dnl AC_LIBOBJ replacement functions directory
|
|
|
|
AC_CONFIG_LIBOBJ_DIR([lib])
|
|
|
|
|
2012-11-10 14:49:44 +00:00
|
|
|
dnl Use Hamlib's termios
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_LIBOBJ([termios])
|
2012-11-10 14:49:44 +00:00
|
|
|
|
|
|
|
dnl Assure libmisc is not empty
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_LIBOBJ([dummy])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
## ------------------------ ##
|
|
|
|
## libtool Initialisation. ##
|
|
|
|
## ------------------------ ##
|
2012-10-11 14:17:58 +00:00
|
|
|
|
2018-04-16 15:39:58 +00:00
|
|
|
AR_FLAGS="cr"
|
2012-09-26 03:29:30 +00:00
|
|
|
LT_PREREQ([2.2.6b])
|
2012-10-07 13:31:10 +00:00
|
|
|
|
2013-09-19 03:58:00 +00:00
|
|
|
dnl N.B. LT_INIT([win32-dll]) does not work for older libtool
|
|
|
|
dnl so require new enough version above.
|
|
|
|
LT_INIT([win32-dll])
|
2012-10-07 13:31:10 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2012-10-07 13:31:10 +00:00
|
|
|
## -------------------------- ##
|
|
|
|
## Custom host configurations ##
|
|
|
|
## -------------------------- ##
|
2012-10-11 14:17:58 +00:00
|
|
|
|
2013-05-17 02:33:25 +00:00
|
|
|
dnl The host_os variable is set by the AC_CANONICAL_HOST macro above.
|
2012-09-27 19:22:07 +00:00
|
|
|
AS_CASE(["$host_os"],
|
2012-10-08 21:40:39 +00:00
|
|
|
[freebsd*], [
|
|
|
|
AM_CPPFLAGS="-I/usr/local/include ${AM_CPPFLAGS}"
|
|
|
|
AM_LDFLAGS="${AM_LDFLAGS} -L/usr/local/lib"
|
|
|
|
AC_SUBST([AM_LDFLAGS])],
|
|
|
|
|
|
|
|
[darwin* | rhapsody*], [
|
|
|
|
# Tell the OS X linker to allocate enough space inside the
|
|
|
|
# libhamlib.X.dylib shared object for install_name_tool(1) to
|
|
|
|
# work. This is useful when including hamlib in an app bundle.
|
|
|
|
OSXLDFLAGS="-Wl,-headerpad_max_install_names"
|
|
|
|
AC_SUBST([OSXLDFLAGS])],
|
|
|
|
|
|
|
|
[mingw* | pw32* | cygwin*], [
|
|
|
|
WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias"
|
|
|
|
AC_SUBST([WINLDFLAGS])
|
|
|
|
|
|
|
|
# Enable ld's "auto import" for executables
|
|
|
|
WINEXELDFLAGS="-Wl,--enable-auto-import"
|
|
|
|
AC_SUBST([WINEXELDFLAGS])
|
|
|
|
])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2012-10-11 14:17:58 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
## ---------------------- ##
|
|
|
|
## External package tests ##
|
|
|
|
## ---------------------- ##
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
dnl Check if C99 struct initializers are supported
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_MSG_CHECKING([whether C99 struct/array initializers are supported])
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
|
|
|
|
[[struct{char a;int b;}s[8]={[3]={.b=5}};]])],
|
|
|
|
[AC_MSG_RESULT(yes)],
|
|
|
|
[AC_MSG_ERROR([""
|
|
|
|
"You need a C99 compliant C compiler that supports struct/array intializers."
|
|
|
|
"Have you considered GCC lately?."])
|
|
|
|
])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
dnl Check for libusb, treat LIBUSB_LIBS and LIBUSB_CFLAGS as precious variables
|
2017-11-20 10:38:40 +00:00
|
|
|
AC_MSG_CHECKING([whether to build USB dependent backends])
|
|
|
|
AC_ARG_WITH([libusb],
|
|
|
|
[AS_HELP_STRING([--without-libusb],
|
|
|
|
[disable USB dependent backends @<:@default=yes@:>@])],
|
|
|
|
[cf_with_libusb=no],
|
|
|
|
[cf_with_libusb=yes]
|
|
|
|
)
|
2013-01-26 13:32:51 +00:00
|
|
|
|
2017-11-20 10:38:40 +00:00
|
|
|
AC_MSG_RESULT([$cf_with_libusb])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
LIBUSB=""
|
2017-11-20 10:38:40 +00:00
|
|
|
AC_ARG_VAR([LIBUSB_CFLAGS], [C compiler flags for libusb, overriding configure defaults])
|
|
|
|
AC_ARG_VAR([LIBUSB_LIBS], [linker flags for libusb, overriding configure check (useful for specifying static libusb-1.0.a (see INSTALL))])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
AS_IF([test x"${cf_with_libusb}" = "xyes"],
|
2017-11-20 10:38:40 +00:00
|
|
|
[AS_IF([test -z $LIBUSB_LIBS],
|
|
|
|
[AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBUSB_LIBS="-lusb-1.0"],
|
|
|
|
[AC_MSG_WARN([libusb_init was not found in libusb-1.0--USB backends will be disabled])])
|
|
|
|
], [cf_with_libusb="yes"])
|
|
|
|
|
|
|
|
AS_IF([test x"${cf_with_libusb}" = "xyes"],
|
|
|
|
[AC_CHECK_HEADERS([libusb.h libusb-1.0/libusb.h])
|
|
|
|
AC_DEFINE([HAVE_LIBUSB],
|
|
|
|
[1],
|
|
|
|
[Define if libusb-1.0 is available])
|
|
|
|
LIBUSB="libusb-1.0"])])
|
2013-10-01 08:00:59 +00:00
|
|
|
|
|
|
|
# Only used in hamlib.pc.in
|
|
|
|
AC_SUBST([LIBUSB])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-02-05 18:56:18 +00:00
|
|
|
dnl Check if readline support in rigctl/rotctl is wanted
|
|
|
|
AC_MSG_CHECKING([whether to use readline in rigctl/rotctl])
|
|
|
|
AC_ARG_WITH([readline],
|
|
|
|
[AS_HELP_STRING([--without-readline],
|
|
|
|
[disable readline in rigctl/rotctl @<:@default=yes@:>@])],
|
|
|
|
[cf_with_readline_support=no],
|
|
|
|
[cf_with_readline_support=yes]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_MSG_RESULT([$cf_with_readline_support])
|
|
|
|
|
|
|
|
AS_IF([test x"$cf_with_readline_support" != "xno"], [
|
|
|
|
# macros/ax_lib_readline.m4
|
|
|
|
AX_LIB_READLINE
|
|
|
|
])
|
|
|
|
|
|
|
|
AS_IF([test x"$ax_cv_lib_readline" = "xno"], [
|
|
|
|
AC_MSG_WARN([readline support not found, using internal input handling.])
|
|
|
|
cf_with_readline_support=no
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
dnl Check if libgd-dev is installed, so we can enable rigmatrix
|
2012-10-18 02:06:03 +00:00
|
|
|
AC_MSG_CHECKING([whether to build HTML rig feature matrix])
|
|
|
|
AC_ARG_ENABLE([html-matrix],
|
|
|
|
[AS_HELP_STRING([--disable-html-matrix],
|
|
|
|
[do not generate HTML rig feature matrix (requires libgd-dev) @<:@default=check@:>@])],
|
|
|
|
[cf_enable_html_matrix=no],
|
|
|
|
[cf_enable_html_matrix=check]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_MSG_RESULT([$cf_enable_html_matrix])
|
|
|
|
|
|
|
|
AS_IF([test x"$cf_enable_html_matrix" != "xno"],
|
|
|
|
[AC_CHECK_HEADERS([gd.h],
|
|
|
|
[AC_CHECK_LIB([gd],
|
|
|
|
[gdImageCreate],
|
|
|
|
[cf_enable_html_matrix=yes],
|
|
|
|
[cf_enable_html_matrix=no],
|
|
|
|
[-lz])],
|
|
|
|
[cf_enable_html_matrix=no]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([HTML_MATRIX], [test x"${cf_enable_html_matrix}" = "xyes"])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
## ------------------ ##
|
|
|
|
## PKG Config support ##
|
|
|
|
## ------------------ ##
|
|
|
|
|
|
|
|
dnl These features rely on the external pkg-config functionality being available.
|
|
|
|
dnl Test for pkg-config only when these features are enabled.
|
|
|
|
|
|
|
|
# libxml2 required rigmem xml support, make it user optional
|
|
|
|
AC_MSG_CHECKING([whether to build rigmem XML support])
|
|
|
|
AC_ARG_WITH([xml-support],
|
|
|
|
[AS_HELP_STRING([--with-xml-support],
|
|
|
|
[build rigmem with XML support @<:@default=no@:>@])],
|
|
|
|
[cf_with_xml_support=$withval],
|
|
|
|
[cf_with_xml_support=no])
|
|
|
|
AC_MSG_RESULT([$cf_with_xml_support])
|
|
|
|
|
|
|
|
|
|
|
|
# USRP needs a C++ compiler, tested for presence above.
|
|
|
|
AS_IF([test x"${cf_with_cxx}" = "xyes"], [
|
|
|
|
AC_MSG_CHECKING([whether to build USRP backend])
|
|
|
|
AC_ARG_ENABLE([usrp],
|
|
|
|
[AS_HELP_STRING([--enable-usrp],
|
|
|
|
[build USRP backend @<:@default=no@:>@])],
|
|
|
|
[cf_with_usrp=$enableval],
|
|
|
|
[cf_with_usrp="no"])
|
|
|
|
AC_MSG_RESULT([$cf_with_usrp])
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Only check for pkg-config when either of the dependent features are enabled.
|
|
|
|
|
|
|
|
AS_IF([test x"${cf_with_xml_support}" = "xyes" || test x"${cf_with_usrp}" = "xyes"], [
|
|
|
|
dnl Check for pkg-config presence and if not installed define a dummy macro
|
|
|
|
dnl to disable libxml2 and USRP use. Code borrowed from:
|
|
|
|
dnl http://lists.gnu.org/archive/html/automake/2011-03/msg00008.html
|
|
|
|
dnl
|
|
|
|
dnl Check for pkg-config program, used for configuring some libraries.
|
|
|
|
m4_define_default([PKG_PROG_PKG_CONFIG],
|
2014-03-04 15:45:54 +00:00
|
|
|
[AC_MSG_CHECKING([pkg-config])
|
2013-12-11 02:14:22 +00:00
|
|
|
AC_MSG_RESULT([no])])
|
2013-10-31 03:29:50 +00:00
|
|
|
|
|
|
|
PKG_PROG_PKG_CONFIG
|
|
|
|
|
|
|
|
dnl If the pkg-config autoconf support isn't installed, define its
|
|
|
|
dnl autoconf macro to disable any packages depending on it.
|
|
|
|
m4_define_default([PKG_CHECK_MODULES],
|
2013-12-11 02:14:22 +00:00
|
|
|
[AC_MSG_CHECKING([$1])
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
$4])
|
2013-10-31 03:29:50 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
AS_IF([test x"${cf_with_xml_support}" = "xyes"], [
|
|
|
|
PKG_CHECK_MODULES([LIBXML2],
|
|
|
|
[libxml-2.0],
|
|
|
|
[AC_DEFINE([HAVE_XML2],
|
|
|
|
[1],
|
|
|
|
[Define if libxml2 is available])],
|
|
|
|
[AC_MSG_WARN([libxml-2.0 pkg-config not found, XML support will be disabled])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_SUBST([LIBXML2_LIBS])
|
|
|
|
AC_SUBST([LIBXML2_CFLAGS])
|
|
|
|
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
## ----------------- ##
|
|
|
|
## Language bindings ##
|
|
|
|
## ----------------- ##
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
BINDINGS=""
|
|
|
|
BINDING_ALL=""
|
|
|
|
BINDING_CHECK=""
|
|
|
|
BINDING_CLEAN=""
|
|
|
|
BINDING_DISTCLEAN=""
|
|
|
|
BINDING_DISTCHECK=""
|
|
|
|
BINDING_INSTALL_EXEC=""
|
|
|
|
BINDING_UNINSTALL=""
|
|
|
|
BINDING_LIST=""
|
|
|
|
BINDING_LIB_TARGETS=""
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
dnl Check if cxx-binding not wanted, default is to build it
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
# C++ binding
|
2017-07-26 11:33:42 +00:00
|
|
|
AC_MSG_CHECKING([whether to build C++ binding])
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_ARG_WITH([cxx-binding],
|
|
|
|
[AS_HELP_STRING([--without-cxx-binding],
|
2017-07-26 11:33:42 +00:00
|
|
|
[do not build C++ binding @<:@default=yes@:>@])],
|
2012-09-27 19:22:07 +00:00
|
|
|
[cf_with_cxx_binding=$withval],
|
|
|
|
[cf_with_cxx_binding=$cf_with_cxx])
|
|
|
|
AC_MSG_RESULT([$cf_with_cxx_binding])
|
2009-11-01 14:45:59 +00:00
|
|
|
|
2012-10-08 21:40:39 +00:00
|
|
|
AS_IF([test x"${cf_with_cxx_binding}" = "xyes"],
|
2012-09-27 19:22:07 +00:00
|
|
|
[BINDINGS="${BINDINGS} c++"])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
|
|
|
|
2012-10-07 13:31:10 +00:00
|
|
|
dnl Check if perl-binding is wanted, default is to not build it
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
# Perl binding
|
2017-07-26 11:33:42 +00:00
|
|
|
AC_MSG_CHECKING([whether to build perl binding])
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_ARG_WITH([perl-binding],
|
|
|
|
[AS_HELP_STRING([--with-perl-binding],
|
2017-07-26 11:33:42 +00:00
|
|
|
[build perl binding @<:@default=no@:>@])],
|
2012-09-27 19:22:07 +00:00
|
|
|
[cf_with_perl_binding=$withval],
|
|
|
|
[cf_with_perl_binding=no])
|
|
|
|
AC_MSG_RESULT([$cf_with_perl_binding])
|
|
|
|
|
|
|
|
dnl SC_PATH_PERLINC from macros/perl.m4
|
2012-10-08 21:40:39 +00:00
|
|
|
AS_IF([test x"${cf_with_perl_binding}" = "xyes"],[
|
|
|
|
SC_PATH_PERLINC
|
|
|
|
BINDING_LIST="${BINDING_LIST} perl"
|
|
|
|
BINDING_ALL="${BINDING_ALL} all-perl"
|
|
|
|
BINDING_CHECK="${BINDING_CHECK} check-perl"
|
|
|
|
BINDING_CLEAN="${BINDING_CLEAN} clean-perl"
|
|
|
|
BINDING_DISTCLEAN="${BINDING_DISTCLEAN} distclean-perl"
|
|
|
|
BINDING_DISTCHECK="${BINDING_DISTCHECK} distcheck-perl"
|
|
|
|
BINDING_INSTALL_EXEC="${BINDING_INSTALL_EXEC} install-perl"
|
|
|
|
BINDING_UNINSTALL="${BINDING_UNINSTALL} uninstall-perl"
|
|
|
|
])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2012-11-17 14:45:16 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_PERL], [test x"${cf_with_perl_binding}" = "xyes"])
|
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-11-28 23:11:41 +00:00
|
|
|
dnl Check for python availability, so we can enable HamlibPy
|
|
|
|
# Python bindings
|
2017-07-26 11:33:42 +00:00
|
|
|
AC_MSG_CHECKING([whether to build python binding])
|
2012-11-28 23:11:41 +00:00
|
|
|
AC_ARG_WITH([python-binding],
|
|
|
|
[AS_HELP_STRING([--with-python-binding],
|
2017-07-26 11:33:42 +00:00
|
|
|
[build python binding @<:@default=no@:>@])],
|
2012-11-28 23:11:41 +00:00
|
|
|
[cf_with_python_binding=$withval],
|
|
|
|
[cf_with_python_binding=no])
|
|
|
|
AC_MSG_RESULT([$cf_with_python_binding])
|
|
|
|
|
|
|
|
dnl AX_PYTHON_DEVEL from macros/ax_python_devel.m4
|
|
|
|
AS_IF([test x"${cf_with_python_binding}" = "xyes"],[
|
2017-07-23 02:44:57 +00:00
|
|
|
dnl Order matters! AX_PYTHON_DEVEL must be first for PYTHON_VERSION to be honored.
|
|
|
|
AX_PYTHON_DEVEL([">='2.1'"])
|
2012-11-28 23:11:41 +00:00
|
|
|
AM_PATH_PYTHON([2.1],, [:])
|
|
|
|
|
|
|
|
BINDING_LIST="${BINDING_LIST} python"
|
|
|
|
BINDING_ALL="${BINDING_ALL} all-py"
|
|
|
|
BINDING_CHECK="${BINDING_CHECK} check-py"
|
|
|
|
BINDING_CLEAN="${BINDING_CLEAN} clean-py"
|
|
|
|
BINDING_DISTCLEAN="${BINDING_DISTCLEAN} distclean-py"
|
|
|
|
BINDING_INSTALL_EXEC="${BINDING_INSTALL_EXEC} install-py"
|
|
|
|
BINDING_UNINSTALL="${BINDING_UNINSTALL} uninstall-py"
|
|
|
|
BINDING_LIB_TARGETS="${BINDING_LIB_TARGETS} \$(python_ltlib)"])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_PYTHON], [test x"${cf_with_python_binding}" = "xyes"])
|
|
|
|
|
2017-07-26 11:33:42 +00:00
|
|
|
dnl Determine whether to install pytest.py or py3test.py to $(docdir)/examples
|
|
|
|
AM_PYTHON_CHECK_VERSION([${PYTHON}], [3.0], [pyver_3="yes"], [pyver_3="no"])
|
|
|
|
AM_CONDITIONAL([PYVER_3], [test x"${pyver_3}" = x"yes"])
|
|
|
|
|
2012-11-28 23:11:41 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
# Tcl binding
|
2017-07-26 11:33:42 +00:00
|
|
|
AC_MSG_CHECKING([Whether to build Tcl bindings])
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_ARG_WITH([tcl-binding],
|
2012-11-28 23:11:41 +00:00
|
|
|
[AS_HELP_STRING([--with-tcl-binding],
|
2017-07-26 11:33:42 +00:00
|
|
|
[build Tcl binding @<:@default=no@:>@])],
|
2012-11-28 23:11:41 +00:00
|
|
|
[build_tcl=$withval],
|
|
|
|
[build_tcl=no])
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_MSG_RESULT([$build_tcl])
|
|
|
|
|
2012-10-07 13:31:10 +00:00
|
|
|
dnl SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG from macros/tcl.m4
|
2012-09-27 19:22:07 +00:00
|
|
|
AS_IF([test x"${build_tcl}" = "xyes"],[
|
2017-07-26 11:33:42 +00:00
|
|
|
dnl Search for and load tclConfig.sh.
|
2012-11-28 23:11:41 +00:00
|
|
|
SC_PATH_TCLCONFIG
|
|
|
|
SC_LOAD_TCLCONFIG
|
|
|
|
|
|
|
|
tcl_save_CPPFLAGS=$CPPFLAGS
|
|
|
|
CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
|
|
|
|
AC_CHECK_HEADERS([tcl.h],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([Unable to find Tcl headers])])
|
|
|
|
CPPFLAGS=$tcl_save_CPPFLAGS
|
|
|
|
|
|
|
|
BINDING_LIST="${BINDING_LIST} tcl"
|
|
|
|
BINDING_ALL="${BINDING_ALL} all-tcl"
|
|
|
|
BINDING_CHECK="${BINDING_CHECK} check-tcl"
|
|
|
|
BINDING_CLEAN="${BINDING_CLEAN} clean-tcl"
|
|
|
|
BINDING_DISTCLEAN="${BINDING_DISTCLEAN} distclean-tcl"
|
|
|
|
BINDING_INSTALL_EXEC="${BINDING_INSTALL_EXEC} install-tcl"
|
|
|
|
BINDING_UNINSTALL="${BINDING_UNINSTALL} uninstall-tcl"
|
|
|
|
BINDING_LIB_TARGETS="${BINDING_LIB_TARGETS} \$(tcl_ltlib)"])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_TCL], [test x"${build_tcl}" = "xyes"])
|
2017-07-26 11:33:42 +00:00
|
|
|
dnl These variables are set once tclConfig.sh is loaded.
|
|
|
|
AC_SUBST([TCL_VERSION])
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_SUBST([TCL_LIB_SPEC])
|
|
|
|
AC_SUBST([TCL_INCLUDE_SPEC])
|
|
|
|
AC_SUBST([TCL_SHLIB_SUFFIX])
|
|
|
|
|
2017-07-26 11:33:42 +00:00
|
|
|
|
2016-11-03 12:04:40 +00:00
|
|
|
dnl Check for lua availability, so we can enable HamlibLua
|
|
|
|
# Lua bindings
|
2017-07-26 11:33:42 +00:00
|
|
|
AC_MSG_CHECKING([whether to build lua binding])
|
2016-11-03 12:04:40 +00:00
|
|
|
AC_ARG_WITH([lua-binding],
|
|
|
|
[AS_HELP_STRING([--with-lua-binding],
|
2017-07-26 11:33:42 +00:00
|
|
|
[build lua binding @<:@default=no@:>@])],
|
2016-11-03 12:04:40 +00:00
|
|
|
[cf_with_lua_binding=$withval],
|
|
|
|
[cf_with_lua_binding=no])
|
|
|
|
AC_MSG_RESULT([$cf_with_lua_binding])
|
|
|
|
|
|
|
|
dnl AX_LUA_DEVEL from macros/ax_lua_devel.m4
|
|
|
|
AS_IF([test x"${cf_with_lua_binding}" = "xyes"],[
|
|
|
|
|
|
|
|
AX_PROG_LUA([5.2], [5.4])
|
|
|
|
AX_LUA_HEADERS
|
|
|
|
AX_LUA_LIBS
|
|
|
|
|
|
|
|
BINDING_LIST="${BINDING_LIST} lua"
|
|
|
|
BINDING_ALL="${BINDING_ALL} all-lua"
|
|
|
|
BINDING_CHECK="${BINDING_CHECK} check-lua"
|
|
|
|
BINDING_CLEAN="${BINDING_CLEAN} clean-lua"
|
|
|
|
BINDING_DISTCLEAN="${BINDING_DISTCLEAN} distclean-lua"
|
|
|
|
BINDING_INSTALL_EXEC="${BINDING_INSTALL_EXEC} install-lua"
|
|
|
|
BINDING_UNINSTALL="${BINDING_UNINSTALL} uninstall-lua"
|
|
|
|
BINDING_LIB_TARGETS="${BINDING_LIB_TARGETS} \$(lua_ltlib)"])
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_LUA], [test x"${cf_with_lua_binding}" = "xyes"])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2017-07-26 11:33:42 +00:00
|
|
|
|
2012-11-20 03:04:42 +00:00
|
|
|
dnl Only search for Swig if one or more bindings are enabled.
|
|
|
|
AS_IF([test "x${BINDING_ALL}" != "x"],
|
|
|
|
[# macros/ax_pkg_swig.m4
|
|
|
|
AX_PKG_SWIG([1.3.22],
|
|
|
|
[BINDINGS="${BINDINGS} bindings"
|
|
|
|
cf_with_bindings="yes"],
|
|
|
|
[AC_MSG_ERROR([SWIG is required to build bindings...])
|
|
|
|
])],
|
|
|
|
[cf_with_bindings="no"])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to build bindings])
|
|
|
|
AC_MSG_RESULT([$cf_with_bindings])
|
|
|
|
|
|
|
|
AC_SUBST([BINDINGS])
|
|
|
|
AC_SUBST([BINDING_ALL])
|
|
|
|
AC_SUBST([BINDING_CHECK])
|
|
|
|
AC_SUBST([BINDING_CLEAN])
|
|
|
|
AC_SUBST([BINDING_DISTCLEAN])
|
|
|
|
AC_SUBST([BINDING_DISTCHECK])
|
|
|
|
AC_SUBST([BINDING_INSTALL_EXEC])
|
|
|
|
AC_SUBST([BINDING_UNINSTALL])
|
|
|
|
AC_SUBST([BINDING_LIST])
|
|
|
|
AC_SUBST([BINDING_LIB_TARGETS])
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
|
|
|
## ----------------- ##
|
|
|
|
## Optional backends ##
|
|
|
|
## ----------------- ##
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
dnl Winradio only under Linux (until someone ports it on other os)
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_MSG_CHECKING([whether to build winradio backend])
|
|
|
|
AC_ARG_ENABLE([winradio],
|
|
|
|
[AS_HELP_STRING([--disable-winradio],
|
|
|
|
[do not build winradio backend @<:@default=yes@:>@])],
|
|
|
|
[cf_with_winradio="no"],
|
2013-09-23 01:45:49 +00:00
|
|
|
[cf_with_winradio="yes" AC_DEFINE([HAVE_WINRADIO],[1],[Define if winradio backend is built])])
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_MSG_RESULT([$cf_with_winradio])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-11-18 18:53:15 +00:00
|
|
|
DL_LIBS=""
|
|
|
|
|
2012-10-08 21:40:39 +00:00
|
|
|
AS_IF([test x"${cf_with_winradio}" = "xyes"],
|
2013-10-31 03:29:50 +00:00
|
|
|
[BACKEND_LIST="$BACKEND_LIST winradio"
|
2013-11-18 18:53:15 +00:00
|
|
|
dnl Check for libdl and set DL_LIBS if found--used for linradio WR-G313 backend.
|
|
|
|
AC_CHECK_LIB([dl], [dlopen], [DL_LIBS="-ldl"],
|
2013-10-31 03:29:50 +00:00
|
|
|
[AC_MSG_WARN([dlopen was not found in libdl--linradio backend will be disabled])])
|
|
|
|
])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2013-11-18 18:53:15 +00:00
|
|
|
dnl Set conditional compilation for G-313.
|
|
|
|
AS_CASE(["$host_os"],
|
|
|
|
[mingw* | pw32* | cygwin ], [
|
|
|
|
AM_CONDITIONAL(G313_LINUX_GNU, false)
|
|
|
|
AM_CONDITIONAL(G313_WINDOWS, true)
|
|
|
|
],
|
|
|
|
dnl As g313-posix.c has a hard dependency on linux/types.h
|
|
|
|
dnl via linradio/wrg313api.h, disable compilation on other POSIX.
|
2014-11-20 04:02:30 +00:00
|
|
|
dnl (Certain systems have extra characters following "-gnu" such as
|
|
|
|
dnl the Raspberry Pi which is "linux-gnueabihf"; presume that "linux-gnu"
|
|
|
|
dnl is a sufficient test.)
|
|
|
|
[ *linux-gnu* ], [
|
2013-11-18 18:53:15 +00:00
|
|
|
AM_CONDITIONAL(G313_LINUX_GNU, true)
|
|
|
|
AM_CONDITIONAL(G313_WINDOWS, false)
|
|
|
|
],
|
|
|
|
[
|
|
|
|
AM_CONDITIONAL(G313_LINUX_GNU, false)
|
|
|
|
AM_CONDITIONAL(G313_WINDOWS, false)
|
2014-11-20 04:02:30 +00:00
|
|
|
AC_DEFINE([OTHER_POSIX], [1], [Compilation on POSIX other than Linux])
|
2013-11-18 18:53:15 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl If libdl is present, check for its header file.
|
|
|
|
AS_IF([test x"${DL_LIBS}" = "x-ldl"],
|
|
|
|
[AC_CHECK_HEADERS([dlfcn.h])])
|
|
|
|
|
|
|
|
AC_SUBST([DL_LIBS])
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
dnl stuff that requires C++ support
|
|
|
|
AS_IF([test x"${cf_with_usrp}" = "xyes"],[
|
|
|
|
PKG_CHECK_MODULES([USRP],
|
|
|
|
[usrp >= 0.8],
|
|
|
|
[AC_DEFINE([HAVE_USRP],[1],[Define if usrp is available])
|
|
|
|
])
|
2012-09-27 19:22:07 +00:00
|
|
|
])
|
2013-10-31 03:29:50 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
AM_CONDITIONAL([HAVE_USRP], [test x"${cf_with_usrp}" = "xyes"])
|
|
|
|
|
|
|
|
|
|
|
|
## -------------------------------- ##
|
|
|
|
## Prepare rig backend dependencies ##
|
|
|
|
## -------------------------------- ##
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
dnl otherwise parallel 'make -jn' will fail
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
for be in ${BACKEND_LIST} ; do
|
2013-09-08 13:56:28 +00:00
|
|
|
BACKENDEPS="${BACKENDEPS} \$(top_builddir)/${be}/libhamlib-${be}.la"
|
2012-09-27 19:22:07 +00:00
|
|
|
done
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_SUBST([BACKEND_LIST])
|
|
|
|
AC_SUBST([BACKENDEPS])
|
|
|
|
|
|
|
|
|
|
|
|
## ---------------------------------- ##
|
|
|
|
## Prepare rotor backend dependencies ##
|
|
|
|
## ---------------------------------- ##
|
|
|
|
|
|
|
|
# otherwise parallel 'make -jn' will fail
|
|
|
|
|
|
|
|
for be in ${ROT_BACKEND_LIST} ; do
|
2013-09-08 13:56:28 +00:00
|
|
|
ROT_BACKENDEPS="${ROT_BACKENDEPS} \$(top_builddir)/${be}/libhamlib-${be}.la"
|
2009-06-03 18:21:48 +00:00
|
|
|
done
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_SUBST([ROT_BACKEND_LIST])
|
|
|
|
AC_SUBST([ROT_BACKENDEPS])
|
2013-05-25 11:00:36 +00:00
|
|
|
|
2013-10-31 03:29:50 +00:00
|
|
|
|
|
|
|
## ------------ ##
|
|
|
|
## Final output ##
|
|
|
|
## ------------ ##
|
|
|
|
|
2013-05-25 11:00:36 +00:00
|
|
|
dnl Output accumulated flags to the Makefile files.
|
2012-09-27 19:22:07 +00:00
|
|
|
AC_SUBST([AM_CPPFLAGS])
|
2013-05-25 11:00:36 +00:00
|
|
|
AC_SUBST([AM_CFLAGS])
|
|
|
|
AC_SUBST([AM_CXXFLAGS])
|
2009-06-03 18:21:48 +00:00
|
|
|
|
2012-11-20 03:04:42 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
macros/Makefile
|
|
|
|
include/Makefile
|
|
|
|
lib/Makefile
|
|
|
|
dummy/Makefile
|
2018-12-10 19:18:15 +00:00
|
|
|
elad/Makefile
|
2009-06-03 18:21:48 +00:00
|
|
|
yaesu/Makefile
|
|
|
|
icom/Makefile
|
2015-01-21 22:57:08 +00:00
|
|
|
icmarine/Makefile
|
2009-06-03 18:21:48 +00:00
|
|
|
aor/Makefile
|
|
|
|
kenwood/Makefile
|
|
|
|
winradio/Makefile
|
|
|
|
pcr/Makefile
|
|
|
|
alinco/Makefile
|
|
|
|
uniden/Makefile
|
|
|
|
tentec/Makefile
|
|
|
|
kachina/Makefile
|
|
|
|
jrc/Makefile
|
|
|
|
drake/Makefile
|
|
|
|
lowe/Makefile
|
|
|
|
rft/Makefile
|
|
|
|
rs/Makefile
|
|
|
|
kit/Makefile
|
|
|
|
tapr/Makefile
|
|
|
|
skanti/Makefile
|
2010-10-26 20:47:35 +00:00
|
|
|
prm80/Makefile
|
2009-06-03 18:21:48 +00:00
|
|
|
wj/Makefile
|
|
|
|
racal/Makefile
|
|
|
|
tuner/Makefile
|
2010-04-25 21:30:17 +00:00
|
|
|
ars/Makefile
|
2009-06-03 18:21:48 +00:00
|
|
|
easycomm/Makefile
|
|
|
|
fodtrack/Makefile
|
|
|
|
gs232a/Makefile
|
|
|
|
heathkit/Makefile
|
|
|
|
spid/Makefile
|
|
|
|
sartek/Makefile
|
|
|
|
src/Makefile
|
|
|
|
c++/Makefile
|
|
|
|
bindings/Makefile
|
|
|
|
tests/Makefile
|
|
|
|
doc/Makefile
|
|
|
|
doc/hamlib.cfg
|
|
|
|
rotorez/Makefile
|
|
|
|
flexradio/Makefile
|
2010-05-19 21:56:00 +00:00
|
|
|
m2/Makefile
|
2011-05-26 20:07:26 +00:00
|
|
|
amsat/Makefile
|
2012-01-11 22:16:41 +00:00
|
|
|
adat/Makefile
|
2011-07-09 12:37:34 +00:00
|
|
|
ts7400/Makefile
|
2011-08-21 16:28:14 +00:00
|
|
|
celestron/Makefile
|
2015-01-06 17:37:15 +00:00
|
|
|
cnctrk/Makefile
|
2013-07-12 14:24:02 +00:00
|
|
|
ether6/Makefile
|
2011-06-21 03:26:27 +00:00
|
|
|
scripts/Makefile
|
2012-12-19 11:59:59 +00:00
|
|
|
android/Makefile
|
2015-12-27 11:09:44 +00:00
|
|
|
prosistel/Makefile
|
2017-02-22 11:14:50 +00:00
|
|
|
dorji/Makefile
|
2017-07-03 22:00:12 +00:00
|
|
|
barrett/Makefile
|
2018-07-06 16:16:41 +00:00
|
|
|
meade/Makefile
|
2018-12-10 19:18:15 +00:00
|
|
|
ioptron/Makefile
|
2018-08-21 04:46:33 +00:00
|
|
|
hamlib.pc
|
2018-12-10 19:18:15 +00:00
|
|
|
])
|
2012-09-27 19:22:07 +00:00
|
|
|
|
2009-06-03 18:21:48 +00:00
|
|
|
AC_OUTPUT
|
|
|
|
|
2011-12-08 04:22:52 +00:00
|
|
|
echo \
|
|
|
|
"----------------------------------------------------------------------
|
|
|
|
|
|
|
|
${PACKAGE_NAME} Version ${PACKAGE_VERSION} configuration:
|
|
|
|
|
2012-09-27 19:22:07 +00:00
|
|
|
Prefix ${prefix}
|
2013-05-25 11:00:36 +00:00
|
|
|
Preprocessor ${CPP} ${CPPFLAGS}
|
|
|
|
C Compiler ${CC} ${CFLAGS}
|
|
|
|
C++ Compiler ${CXX} ${CXXFLAGS}
|
2011-12-08 04:22:52 +00:00
|
|
|
|
|
|
|
Package features:
|
2012-10-18 02:06:03 +00:00
|
|
|
With C++ binding ${cf_with_cxx_binding}
|
|
|
|
With Perl binding ${cf_with_perl_binding}
|
|
|
|
With Python binding ${cf_with_python_binding}
|
|
|
|
With TCL binding ${build_tcl}
|
2016-11-03 12:04:40 +00:00
|
|
|
With Lua binding ${cf_with_lua_binding}
|
2012-10-18 02:06:03 +00:00
|
|
|
With rigmem XML support ${cf_with_xml_support}
|
2013-02-05 18:56:18 +00:00
|
|
|
With Readline support ${cf_with_readline_support}
|
2012-10-18 02:06:03 +00:00
|
|
|
|
|
|
|
Enable HTML rig feature matrix ${cf_enable_html_matrix}
|
|
|
|
Enable WinRadio ${cf_with_winradio}
|
|
|
|
Enable USRP ${cf_with_usrp}
|
|
|
|
Enable USB backends ${cf_with_libusb}
|
|
|
|
Enable shared libs ${enable_shared}
|
|
|
|
Enable static libs ${enable_static}
|
2011-12-08 04:22:52 +00:00
|
|
|
|
|
|
|
-----------------------------------------------------------------------"
|