configure.ac,Makefile.am,build.sh : Updated to use external libcm.
This commit is contained in:
parent
93060eabc7
commit
1a16a3d5d8
46
Makefile.am
46
Makefile.am
@ -1,24 +1,29 @@
|
|||||||
|
AM_CXXFLAGS =
|
||||||
|
AM_LDFLAGS =
|
||||||
|
AM_CPPFLAGS =
|
||||||
|
AM_CFLAGS =
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4 # use custom macro's in ./m4
|
ACLOCAL_AMFLAGS = -I m4 # use custom macro's in ./m4
|
||||||
|
|
||||||
lib_LTLIBRARIES=
|
# if we are building and linking to a nested copy of libcm
|
||||||
bin_PROGRAMS=
|
if BUILD_LIBCM
|
||||||
include_HEADERS=
|
SUBDIRS = src/libcm
|
||||||
|
AM_CPPFLAGS += -I$(srcdir)/src/libcm/src -I$(srcdir)/src/libcm/src/dsp -I$(srcdir)/src/libcm/src/vop -I$(srcdir)/src/libcm/src/app
|
||||||
|
AM_LDFLAGS += -Lsrc/libcm/src
|
||||||
|
endif
|
||||||
|
|
||||||
|
# To Profile w/ gprof:
|
||||||
|
# 1) Modify configure: ./configure --disable-shared CFLAGS="-pg"
|
||||||
|
# 2) Run the program. ./foo
|
||||||
|
# 3) Run gprof /libtool --mode=execute gprof ./foo
|
||||||
|
|
||||||
# C compiler flags
|
# C compiler flags
|
||||||
# _GNU_SOURCE - turns on GNU specific extensions and gives correct prototype for double log2(double)
|
# _GNU_SOURCE - turns on GNU specific extensions and gives correct prototype for double log2(double)
|
||||||
# -Wall turn on all warnings
|
# -Wall turn on all warnings
|
||||||
# -Wno-multichar - turns off multi-character constant warnings from cmAudioFile.c
|
# -Wno-multichar - turns off multi-character constant warnings from cmAudioFile.c
|
||||||
|
|
||||||
|
AM_CPPFLAGS += -D _GNU_SOURCE -I.. -I$(srcdir)/src/libcmpp -I$(srcdir)/src/libcmpp/fltk -I$(srcdir)/src/tlCtl
|
||||||
|
AM_CFLAGS += -Wno-multichar
|
||||||
AM_CPPFLAGS = -D _GNU_SOURCE -I.. -I$(srcdir)/src/libcm -I$(srcdir)/src/libcm/dsp -I$(srcdir)/src/libcm/vop -I$(srcdir)/src/libcm/app
|
|
||||||
AM_CPPFLAGS += -I$(srcdir)/src/libcmpp -I$(srcdir)/src/libcmpp/fltk -I$(srcdir)/src/tlCtl
|
|
||||||
AM_CFLAGS = -Wno-multichar
|
|
||||||
AM_CXXFLAGS =
|
|
||||||
AM_LDFLAGS =
|
|
||||||
MYLIBS = -lpthread -lfftw3f -lfftw3 -lfltk -lX11
|
|
||||||
CMLIBS = src/libcm/libcm.la src/libcmpp/libcmpp.la # autoconfig manual recommends storing direct referenes to non-3rd party libraries rather than using -L and -l
|
|
||||||
|
|
||||||
|
|
||||||
# debug/release switches
|
# debug/release switches
|
||||||
if DEBUG
|
if DEBUG
|
||||||
@ -29,6 +34,8 @@ else
|
|||||||
AM_CXXFLAGS += -O3
|
AM_CXXFLAGS += -O3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
MYLIBS = -lpthread -lfftw3f -lfftw3 -lfltk -lX11 -lcm
|
||||||
|
|
||||||
# NOTE: 10/25/12 The use of -Wl, -Bstatic -Wl, -Bdynamic forces linking
|
# NOTE: 10/25/12 The use of -Wl, -Bstatic -Wl, -Bdynamic forces linking
|
||||||
# against the static version of 'libasound' and then turns dynamic linking
|
# against the static version of 'libasound' and then turns dynamic linking
|
||||||
# back on for the other libraries.
|
# back on for the other libraries.
|
||||||
@ -53,15 +60,10 @@ if OS_OSX
|
|||||||
AM_LDFLAGS += -framework Cocoa -framework CoreAudio -framework CoreMIDI -framework Carbon -framework Accelerate
|
AM_LDFLAGS += -framework Cocoa -framework CoreAudio -framework CoreMIDI -framework Carbon -framework Accelerate
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include src/libcm/Makefile.am
|
|
||||||
src_libcm_libcm_la_SOURCES = $(cmSRC) $(cmHDR)
|
|
||||||
include_HEADERS += $(cmHDR)
|
|
||||||
lib_LTLIBRARIES += src/libcm/libcm.la
|
|
||||||
|
|
||||||
include src/libcmpp/Makefile.am
|
include src/libcmpp/Makefile.am
|
||||||
src_libcmpp_libcmpp_la_SOURCES = $(cmppSRC) $(cmppHDR)
|
src_libcmpp_libcmpp_la_SOURCES = $(cmppSRC) $(cmppHDR)
|
||||||
include_HEADERS += $(cmppHDR)
|
include_HEADERS = $(cmppHDR)
|
||||||
lib_LTLIBRARIES += src/libcmpp/libcmpp.la
|
lib_LTLIBRARIES = src/libcmpp/libcmpp.la
|
||||||
|
|
||||||
include src/tlCtl/Makefile.am
|
include src/tlCtl/Makefile.am
|
||||||
src_kc_kc_SOURCES = $(tlCtlSRC)
|
src_kc_kc_SOURCES = $(tlCtlSRC)
|
||||||
@ -69,5 +71,5 @@ src_kc_kc_SOURCES = $(tlCtlSRC)
|
|||||||
src_kc_kc_SOURCES += src/kc/kcMain.cpp
|
src_kc_kc_SOURCES += src/kc/kcMain.cpp
|
||||||
src_kc_kc_SOURCES += src/kc/kcApp.h src/kc/kcApp.cpp
|
src_kc_kc_SOURCES += src/kc/kcApp.h src/kc/kcApp.cpp
|
||||||
|
|
||||||
src_kc_kc_LDADD = $(CMLIBS) $(MYLIBS)
|
src_kc_kc_LDADD = src/libcmpp/libcmpp.la $(MYLIBS)
|
||||||
bin_PROGRAMS += src/kc/kc
|
bin_PROGRAMS = src/kc/kc
|
||||||
|
@ -11,8 +11,8 @@ cd ${curdir}
|
|||||||
--enable-debug \
|
--enable-debug \
|
||||||
CFLAGS="-g -Wall" \
|
CFLAGS="-g -Wall" \
|
||||||
CXXFLAGS="-g -Wall" \
|
CXXFLAGS="-g -Wall" \
|
||||||
CPPFLAGS= \
|
CPPFLAGS="-I/home/kevin/src/libcm/build/linux/debug/include " \
|
||||||
LDFLAGS= \
|
LDFLAGS="-L/home/kevin/src/libcm/build/linux/debug/lib" \
|
||||||
LIBS=
|
LIBS=
|
||||||
# --enable-sonicart \
|
# --enable-sonicart \
|
||||||
|
|
||||||
|
27
configure.ac
27
configure.ac
@ -3,7 +3,7 @@
|
|||||||
# this configure.ac or any of the Makefile.am files.
|
# this configure.ac or any of the Makefile.am files.
|
||||||
#
|
#
|
||||||
|
|
||||||
AC_INIT([kc],[1.0],[kc@larke.org])
|
AC_INIT([kc],[1.0],[kl@currawongproject.org])
|
||||||
AC_CONFIG_AUX_DIR([build-aux]) # put aux files in build-aux
|
AC_CONFIG_AUX_DIR([build-aux]) # put aux files in build-aux
|
||||||
AM_INIT_AUTOMAKE([1.9 -Wall foreign subdir-objects]) # subdir-objects needed for non-recursive make
|
AM_INIT_AUTOMAKE([1.9 -Wall foreign subdir-objects]) # subdir-objects needed for non-recursive make
|
||||||
AC_CONFIG_SRCDIR([src/kc/kcMain.cpp])
|
AC_CONFIG_SRCDIR([src/kc/kcMain.cpp])
|
||||||
@ -50,7 +50,6 @@ AC_CHECK_FUNCS([clock_gettime floor memmove memset mkdir pow rint select socket
|
|||||||
# be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
|
# be sure to also set "ACLOCAL_AMFLAGS = -I m4" in ./Makefile.am
|
||||||
# Defines the config.h variable OS_LINUX or OS_OSX
|
# Defines the config.h variable OS_LINUX or OS_OSX
|
||||||
AX_FUNC_OS_TYPE
|
AX_FUNC_OS_TYPE
|
||||||
|
|
||||||
AX_FUNC_OS_64
|
AX_FUNC_OS_64
|
||||||
|
|
||||||
# ac_cv_os_type is set by AX_FUNC_OS_TYPE
|
# ac_cv_os_type is set by AX_FUNC_OS_TYPE
|
||||||
@ -61,6 +60,23 @@ echo "OS='${ax_cv_os_type}'"
|
|||||||
AM_CONDITIONAL([OS_64],[test x"${ax_cv_os_64}" == xx86_64])
|
AM_CONDITIONAL([OS_64],[test x"${ax_cv_os_64}" == xx86_64])
|
||||||
echo "ptr width='${ax_cv_os_64}'"
|
echo "ptr width='${ax_cv_os_64}'"
|
||||||
|
|
||||||
|
# check if a request has been made to build libcm
|
||||||
|
AC_ARG_ENABLE([build_libcm],
|
||||||
|
[ --enable-build_libcm libcm is included in the local source tree],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) build_libcm=true ;;
|
||||||
|
no) build_libcm=false ;;
|
||||||
|
*) AC_MSG_ERROR([bad value ${enableval} for --enable-build_libcm]) ;;
|
||||||
|
esac],[build_libcm=false])
|
||||||
|
|
||||||
|
echo "build_libcm=${build_libcm}"
|
||||||
|
|
||||||
|
# check if a nested copy of libcm exists in /src/libcm
|
||||||
|
AC_CHECK_FILE([${srcdir}/src/libcm/src/cmGlobal.h],[local_libcm=true],[local_libcm=false])
|
||||||
|
echo "local_libcm=${local_libcm}"
|
||||||
|
|
||||||
|
# set BUILD_LIBCM if a libcm build request was set and a nested copy of libcm exists
|
||||||
|
AM_CONDITIONAL([BUILD_LIBCM], [test x$build_libcm = xtrue -a x$local_libcm = xtrue ])
|
||||||
|
|
||||||
AC_ARG_ENABLE([debug],
|
AC_ARG_ENABLE([debug],
|
||||||
[ --enable-debug Turn on debugging],
|
[ --enable-debug Turn on debugging],
|
||||||
@ -125,6 +141,11 @@ fi
|
|||||||
|
|
||||||
AM_CONDITIONAL([INC_SONICART], [test x$sonicart = xtrue])
|
AM_CONDITIONAL([INC_SONICART], [test x$sonicart = xtrue])
|
||||||
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([ Makefile ])
|
AC_CONFIG_FILES([ Makefile ])
|
||||||
|
|
||||||
|
# if local nested libcm then do recursive configure into subdirs
|
||||||
|
if test x$build_libcm = xtrue -a x$local_libcm = xtrue; then
|
||||||
|
AC_CONFIG_SUBDIRS([src/libcm])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
Loading…
Reference in New Issue
Block a user