2007-11-28 22:32:50 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
2008-02-20 20:10:25 +00:00
|
|
|
AC_COPYRIGHT([Copyright (C) 2007, 2008 Stelios Bounanos, M0GLD (m0gld AT enotty DOT net)])
|
2007-11-28 22:32:50 +00:00
|
|
|
|
|
|
|
AC_PREREQ(2.61)
|
2008-02-25 16:39:29 +00:00
|
|
|
AC_INIT([fldigi], [2.10J], [w1hkj AT w1hkj DOT com])
|
2007-11-28 22:32:50 +00:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2008-02-15 19:36:53 +00:00
|
|
|
|
|
|
|
# define build, build_cpu, build_vendor, build_os
|
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
# define host, host_cpu, host_vendor, host_os
|
|
|
|
AC_CANONICAL_HOST
|
2008-02-20 20:10:25 +00:00
|
|
|
# define target, target_cpu, target_vendor, target_os
|
2008-02-15 19:36:53 +00:00
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
2008-01-29 15:58:15 +00:00
|
|
|
AM_INIT_AUTOMAKE([-Wall foreign std-options 1.9.6])
|
2007-11-28 22:32:50 +00:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
AC_CONFIG_SRCDIR([src/main.cxx])
|
|
|
|
AC_CONFIG_HEADER([src/config.h])
|
2008-02-20 20:10:25 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2007-11-28 22:32:50 +00:00
|
|
|
|
2008-02-15 19:36:53 +00:00
|
|
|
|
2008-01-24 11:05:43 +00:00
|
|
|
AC_DEFINE(PACKAGE_HOME, ["http://www.w1hkj.com/Fldigi-2.x.html"], [Home page])
|
|
|
|
AC_DEFINE(PACKAGE_DOCS, ["http://www.w1hkj.com/FldigiHelp-2.0/index.html"], [Docs index])
|
|
|
|
|
2008-02-15 19:36:53 +00:00
|
|
|
|
2007-11-28 22:32:50 +00:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CC
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_DIRENT
|
2008-02-04 00:54:01 +00:00
|
|
|
AC_CHECK_HEADERS([arpa/inet.h execinfo.h fcntl.h limits.h memory.h netdb.h netinet/in.h regex.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h termios.h unistd.h values.h])
|
2007-11-28 22:32:50 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_INT16_T
|
|
|
|
AC_TYPE_INT32_T
|
2007-12-09 16:44:10 +00:00
|
|
|
AC_TYPE_INT64_T
|
2007-11-28 22:32:50 +00:00
|
|
|
AC_TYPE_INT8_T
|
|
|
|
AC_C_RESTRICT
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
AC_TYPE_UINT8_T
|
|
|
|
AC_C_VOLATILE
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_CLOSEDIR_VOID
|
|
|
|
AC_FUNC_ERROR_AT_LINE
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_STRFTIME
|
|
|
|
AC_FUNC_STRTOD
|
2008-02-04 00:54:01 +00:00
|
|
|
AC_CHECK_FUNCS([gethostbyname localtime_r memmove memset mkdir select snprintf socket strcasecmp strchr strdup strerror strncasecmp strcasestr strrchr strstr strtol uname vsnprintf])
|
2007-11-28 22:32:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
AC_PRESERVE_HELP_ORDER
|
|
|
|
|
2008-02-20 20:10:25 +00:00
|
|
|
dnl blank line before our options in configure's help text
|
2007-11-28 22:32:50 +00:00
|
|
|
AC_ARG_WITH([], [], [], [])
|
|
|
|
|
2008-02-20 20:10:25 +00:00
|
|
|
### static flag
|
|
|
|
# Set ac_cv_static to yes/no
|
|
|
|
# Substitute RTLIB in Makefile
|
|
|
|
AC_FLDIGI_STATIC
|
|
|
|
|
|
|
|
### debug flag
|
|
|
|
# Set ac_cv_debug to yes/no
|
|
|
|
# Override CXXFLAGS
|
|
|
|
# Set ENABLE_DEBUG Makefile conditional
|
|
|
|
# Substitute RDYNAMIC in Makefile
|
|
|
|
AC_FLDIGI_DEBUG
|
|
|
|
|
|
|
|
### TLS flag
|
|
|
|
# Set ac_cv_tls to yes/no
|
|
|
|
# Define USE_TLS in config.h
|
|
|
|
AC_FLDIGI_TLS
|
|
|
|
|
|
|
|
### std::bind or alternatives
|
|
|
|
# Set ac_cv_std_bind or ac_cv_std_tr1_bind to yes/no
|
|
|
|
# Define HAVE_STD_BIND or HAVE_STD_TR1_BIND in config.h
|
|
|
|
# Substitute BOOST_CPPFLAGS and BOOST_LDFLAGS in Makefile
|
|
|
|
# if falling back to Boost
|
|
|
|
AC_FLDIGI_BIND
|
|
|
|
|
|
|
|
### FLTK
|
|
|
|
# Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile
|
|
|
|
# Set FLUID variable
|
|
|
|
# Set HAVE_FLUID Makefile conditional
|
|
|
|
AC_FLDIGI_FLTK
|
|
|
|
|
|
|
|
### OSS
|
|
|
|
# Set ac_cv_oss to yes/no
|
|
|
|
# Define USE_OSS in config.h
|
|
|
|
AC_FLDIGI_OSS
|
|
|
|
|
|
|
|
### libsamplerate
|
|
|
|
# Substitute SAMPLERATE_CFLAGS and SAMPLERATE_LIBS in Makefile
|
|
|
|
# Set NO_SAMPLERATE Makefile conditional
|
|
|
|
AC_FLDIGI_SAMPLERATE
|
|
|
|
|
|
|
|
### libsndfile
|
|
|
|
# Set ac_cv_sndfile to yes/no
|
|
|
|
# Define USE_SNDFILE in config.h
|
|
|
|
# Substitute SNDFILE_CFLAGS and SNDFILE_LIBS in Makefile
|
|
|
|
AC_FLDIGI_PKG_CHECK([sndfile], [sndfile >= 1.0.10], [with], [SNDFILE],
|
|
|
|
[enable reading/writing of audio files via libsndfile @<:@autodetect@:>@] )
|
|
|
|
|
|
|
|
### portaudio
|
|
|
|
# Set ac_cv_portaudio to yes/no
|
|
|
|
# Define USE_PORTAUDIO in config.h
|
|
|
|
# Substitute PORTAUDIO_CFLAGS and PORTAUDIO_LIBS in Makefile
|
|
|
|
AC_FLDIGI_PKG_CHECK([portaudio], [portaudio-2.0 >= 19], [without], [PORTAUDIO],
|
|
|
|
[enable support for PortAudio @<:@autodetect@:>@] )
|
|
|
|
|
|
|
|
### pulseaudio
|
|
|
|
# Set ac_cv_pulseaudio to yes/no
|
|
|
|
# Define USE_PULSEAUDIO in config.h
|
|
|
|
# Substitute PULSEAUDIO_CFLAGS and PULSEAUDIO_LIBS in Makefile
|
|
|
|
AC_FLDIGI_PKG_CHECK([pulseaudio], [libpulse-simple >= 0.9.7], [with], [PULSEAUDIO],
|
|
|
|
[enable support for PulseAudio @<:@autodetect@:>@] )
|
|
|
|
|
|
|
|
if test "x$ac_cv_oss" = "xno" && \
|
|
|
|
test "x$ac_cv_portaudio" = "xno" && \
|
|
|
|
test "x$ac_cv_pulseaudio" = "xno"; then
|
|
|
|
AC_MSG_FAILURE([$PACKAGE requires OSS, PortAudio, or PulseAudio])
|
2007-11-28 22:32:50 +00:00
|
|
|
fi
|
|
|
|
|
2008-02-20 20:10:25 +00:00
|
|
|
### hamlib
|
|
|
|
# Set ac_cv_hamlib to yes/no
|
|
|
|
# Define USE_HAMLIB in config.h
|
|
|
|
# Substitute HAMLIB_CFLAGS and HAMLIB_LIBS in Makefile
|
|
|
|
# Set ENABLE_HAMLIB Makefile conditional
|
|
|
|
AC_FLDIGI_PKG_CHECK([hamlib], [hamlib >= 1.2.4], [with], [HAMLIB],
|
|
|
|
[use hamradio control libraries @<:@autodetect@:>@],
|
|
|
|
[ENABLE_HAMLIB])
|
2008-01-09 04:19:08 +00:00
|
|
|
|
|
|
|
|
2008-02-20 20:10:25 +00:00
|
|
|
### output
|
2008-01-09 04:19:08 +00:00
|
|
|
AH_TOP([
|
|
|
|
#ifndef CONFIG_H_
|
|
|
|
#define CONFIG_H_
|
|
|
|
])
|
|
|
|
AH_BOTTOM([
|
|
|
|
#include "util.h"
|
|
|
|
#endif /* CONFIG_H_ */
|
|
|
|
])
|
2007-11-28 22:32:50 +00:00
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile])
|
|
|
|
AC_OUTPUT
|
|
|
|
|
2008-02-20 20:10:25 +00:00
|
|
|
|
|
|
|
### summary
|
2007-11-28 22:32:50 +00:00
|
|
|
AC_MSG_RESULT([
|
|
|
|
Configuration summary:
|
|
|
|
|
|
|
|
Version ............................. $VERSION
|
|
|
|
|
|
|
|
Static linking ...................... $ac_cv_static
|
|
|
|
Debugging ........................... $ac_cv_debug
|
|
|
|
|
|
|
|
sndfile ............................. $ac_cv_sndfile
|
2008-02-15 19:36:53 +00:00
|
|
|
OSS ................................. $ac_cv_oss
|
2007-11-28 22:32:50 +00:00
|
|
|
PortAudio ........................... $ac_cv_portaudio
|
2008-02-20 20:10:25 +00:00
|
|
|
PulseAudio .......................... $ac_cv_pulseaudio
|
2007-11-28 22:32:50 +00:00
|
|
|
hamlib .............................. $ac_cv_hamlib
|
|
|
|
])
|