simplify our configure and Makefile.am. Set our CFLAGS and LDFLAGS primarily from configure.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4512 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-03-11 04:02:10 +00:00
parent 76c6d4e3cb
commit 55b3e6cb62
6 changed files with 334 additions and 291 deletions

View File

@ -4,20 +4,14 @@ AUTOMAKE_OPTS = gnu foreign
NAME=freeswitch
PREFIX=$(prefix)
AM_CFLAGS = $(new_AM_CFLAGS)
AM_CFLAGS = $(SWITCH_AM_CFLAGS)
AM_CPPFLAGS = $(AM_CFLAGS)
AM_LDFLAGS = $(new_AM_LDFLAGS)
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
BASE = $(PWD)
OSARCH=$(shell uname -s)
LIBTOOL=$(PWD)/libtool
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
FIRST_INCLUDES = -I$(PWD)/src/include -I$(PWD)
AM_CFLAGS += $(FIRST_INCLUDES) -I$(PREFIX)/include
AM_LDFLAGS += -L$(PREFIX)/lib
AM_LDFLAGS += -lm -L/usr/local/lib/db42 -L/usr/local/lib
if CRASHPROT
AM_CFLAGS += -DCRASH_PROT
endif
@ -72,36 +66,30 @@ src/include/switch_log.h\
src/include/switch_xml.h
BUILT_SOURCES = version depends
CLEANFILES = src/include/switch_version.h scripts/fsxs
CLEANFILES = src/include/switch_version.h
APR_CONFIG=$(PWD)/libs/apr/apr-1-config
APU_CONFIG=$(PWD)/libs/apr-util/apu-1-config
CORE_CFLAGS = $(shell $(switch_srcdir)/libs/apr/apr-1-config --cflags --cppflags --includes)
CORE_CFLAGS += $(shell $(switch_srcdir)/libs/apr-util/apu-1-config --includes)
CORE_CFLAGS += -I$(PWD)/libs/sqlite
CORE_CFLAGS += -I$(PWD)/libs/pcre
CORE_CFLAGS += -I$(PWD)/libs/srtp/include
CORE_CFLAGS += -I$(PWD)/libs/srtp/crypto/include
CORE_CFLAGS += -I$(PWD)/libs/libresample/include
CORE_CFLAGS += -I$(PWD)/libs/libteletone/src
CORE_INCLUDES = -I$(PWD)/libs/apr/include
CORE_INCLUDES += -I$(PWD)/libs/apr-util/include
CORE_INCLUDES += -I$(PWD)/libs/sqlite
CORE_INCLUDES += -I$(PWD)/libs/pcre
CORE_INCLUDES += -I$(PWD)/libs/srtp/include
CORE_INCLUDES += -I$(PWD)/libs/srtp/crypto/include
CORE_INCLUDES += -I$(PWD)/libs/libresample/include
CORE_INCLUDES += -I$(PWD)/libs/libteletone/src
CORE_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes)
CORE_CFLAGS += $(shell $(APU_CONFIG) --includes)
CORE_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs )
CORE_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs )
CORE_LDFLAGS = $(shell $(switch_srcdir)/libs/apr/apr-1-config --link-ld --libs )
CORE_LDFLAGS += $(shell $(switch_srcdir)/libs/apr-util/apu-1-config --link-ld --libs )
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(FIRST_INCLUDES) $(CORE_INCLUDES) $(AM_CFLAGS) $(CORE_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(CORE_LDFLAGS)
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(CORE_LDFLAGS) $(AM_LDFLAGS)
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lpcre
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
$(libfreeswitch_la_SOURCES): depends version
bin_PROGRAMS = freeswitch
bin_SCRIPTS = scripts/fsxs
freeswitch_SOURCES = src/switch.c\
src/include/switch_version.h
freeswitch_CFLAGS = $(AM_CFLAGS)
@ -201,27 +189,6 @@ install_mod: modules
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
scripts/fsxs: scripts/fsxs.in
@echo creating fsxs
@sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
-e "s,@LIB_DIR\@,$(PREFIX)/lib," \
-e "s,@BIN_DIR\@,$(PREFIX)/bin," \
-e "s,@INC_DIR\@,$(PREFIX)/include," \
-e "s,@CFG_DIR\@,$(PREFIX)/conf," \
-e "s,@DB_DIR\@,$(PREFIX)/db," \
-e "s,@PREFIX\@,$(PREFIX)," \
-e "s,@CC\@,$(CC)," \
-e "s,@LD\@,$(CC)," \
-e "s,@INSTALL\@,$(INSTALL)," \
-e "s,@MKINSTALLDIRS\@,$(mkdir_p)," \
\
-e "s|@CFLAGS\@|$(CFLAGS) $(shell $(APR_CONFIG) --cflags --cppflags)|" \
-e "s|@INCLUDES\@|-I$(PREFIX)/include $(shell $(APR_CONFIG) --includes) $(shell $(APU_CONFIG) --includes)|" \
-e "s|@SOLINK\@|$(SOLINK)|" \
-e "s|@LDFLAGS\@|-L$(PREFIX)/lib|" \
-e "s|@LIBS\@|-lfreeswitch|" \
scripts/fsxs.in > scripts/fsxs
eclean: clean
rm -f `find . -type f -name \*~`
rm -f `find . -type f -name \.*~`

View File

@ -16,7 +16,6 @@
SOURCES = $(libfreeswitch_la_SOURCES) $(nodist_libfreeswitch_la_SOURCES) $(freeswitch_SOURCES)
srcdir = @srcdir@
@ -79,7 +78,7 @@ am__vpath_adj = case $$p in \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"
"$(DESTDIR)$(library_includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
libfreeswitch_la_DEPENDENCIES =
@ -107,8 +106,6 @@ PROGRAMS = $(bin_PROGRAMS)
am_freeswitch_OBJECTS = freeswitch-switch.$(OBJEXT)
freeswitch_OBJECTS = $(am_freeswitch_OBJECTS)
freeswitch_DEPENDENCIES = ${top_builddir}/libfreeswitch.la
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/build/config/depcomp
am__depfiles_maybe = depfiles
@ -208,6 +205,8 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SOLINK = @SOLINK@
STRIP = @STRIP@
SWITCH_AM_CFLAGS = @SWITCH_AM_CFLAGS@
SWITCH_AM_LDFLAGS = @SWITCH_AM_LDFLAGS@
VERSION = @VERSION@
WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@
WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@
@ -251,8 +250,6 @@ localstatedir = @localstatedir@
long_value = @long_value@
mandir = @mandir@
mkdir_p = @mkdir_p@
new_AM_CFLAGS = @new_AM_CFLAGS@
new_AM_LDFLAGS = @new_AM_LDFLAGS@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
@ -263,6 +260,8 @@ size_t_fmt = @size_t_fmt@
size_t_value = @size_t_value@
ssize_t_fmt = @ssize_t_fmt@
ssize_t_value = @ssize_t_value@
switch_builddir = @switch_builddir@
switch_srcdir = @switch_srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
uint64_t_fmt = @uint64_t_fmt@
@ -272,15 +271,12 @@ SUBDIRS =
AUTOMAKE_OPTS = gnu foreign
NAME = freeswitch
PREFIX = $(prefix)
AM_CFLAGS = $(new_AM_CFLAGS) $(FIRST_INCLUDES) -I$(PREFIX)/include \
$(am__append_1)
AM_CFLAGS = $(SWITCH_AM_CFLAGS) $(am__append_1)
AM_CPPFLAGS = $(AM_CFLAGS)
AM_LDFLAGS = $(new_AM_LDFLAGS) -L$(PREFIX)/lib -lm \
-L/usr/local/lib/db42 -L/usr/local/lib
AM_LDFLAGS = $(SWITCH_AM_LDFLAGS)
BASE = $(PWD)
OSARCH = $(shell uname -s)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
FIRST_INCLUDES = -I$(PWD)/src/include -I$(PWD)
libfreeswitch_la_SOURCES = \
src/switch_apr.c \
src/switch_buffer.c \
@ -330,25 +326,22 @@ src/include/switch_log.h\
src/include/switch_xml.h
BUILT_SOURCES = version depends
CLEANFILES = src/include/switch_version.h scripts/fsxs
APR_CONFIG = $(PWD)/libs/apr/apr-1-config
APU_CONFIG = $(PWD)/libs/apr-util/apu-1-config
CORE_INCLUDES = -I$(PWD)/libs/apr/include \
-I$(PWD)/libs/apr-util/include -I$(PWD)/libs/sqlite \
-I$(PWD)/libs/pcre -I$(PWD)/libs/srtp/include \
-I$(PWD)/libs/srtp/crypto/include \
CLEANFILES = src/include/switch_version.h
CORE_CFLAGS = $(shell $(switch_srcdir)/libs/apr/apr-1-config --cflags \
--cppflags --includes) $(shell \
$(switch_srcdir)/libs/apr-util/apu-1-config --includes) \
-I$(PWD)/libs/sqlite -I$(PWD)/libs/pcre \
-I$(PWD)/libs/srtp/include -I$(PWD)/libs/srtp/crypto/include \
-I$(PWD)/libs/libresample/include \
-I$(PWD)/libs/libteletone/src
CORE_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes) \
$(shell $(APU_CONFIG) --includes)
CORE_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs ) $(shell \
$(APU_CONFIG) --link-ld --libs )
CORE_LDFLAGS = $(shell $(switch_srcdir)/libs/apr/apr-1-config \
--link-ld --libs ) $(shell \
$(switch_srcdir)/libs/apr-util/apu-1-config --link-ld --libs )
lib_LTLIBRARIES = libfreeswitch.la
libfreeswitch_la_CFLAGS = $(FIRST_INCLUDES) $(CORE_INCLUDES) $(AM_CFLAGS) $(CORE_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(CORE_LDFLAGS)
libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS)
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(CORE_LDFLAGS) $(AM_LDFLAGS)
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lpcre
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
bin_SCRIPTS = scripts/fsxs
freeswitch_SOURCES = src/switch.c\
src/include/switch_version.h
@ -473,25 +466,6 @@ clean-binPROGRAMS:
freeswitch$(EXEEXT): $(freeswitch_OBJECTS) $(freeswitch_DEPENDENCIES)
@rm -f freeswitch$(EXEEXT)
$(LINK) $(freeswitch_LDFLAGS) $(freeswitch_OBJECTS) $(freeswitch_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f $$d$$p; then \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
else :; fi; \
done
uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(bin_SCRIPTS)'; for p in $$list; do \
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
rm -f "$(DESTDIR)$(bindir)/$$f"; \
done
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -972,12 +946,12 @@ distcleancheck: distclean
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(HEADERS)
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
install-binPROGRAMS: install-libLTLIBRARIES
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"; do \
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(library_includedir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: $(BUILT_SOURCES)
@ -1031,8 +1005,7 @@ info-am:
install-data-am: install-library_includeHEADERS
install-exec-am: install-binPROGRAMS install-binSCRIPTS \
install-libLTLIBRARIES
install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
install-info: install-info-recursive
@ -1060,9 +1033,8 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
uninstall-info-am uninstall-libLTLIBRARIES \
uninstall-library_includeHEADERS
uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
uninstall-info: uninstall-info-recursive
@ -1074,16 +1046,16 @@ uninstall-info: uninstall-info-recursive
distclean-generic distclean-hdr distclean-libtool \
distclean-recursive distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-binPROGRAMS install-binSCRIPTS \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-libLTLIBRARIES \
install install-am install-binPROGRAMS install-data \
install-data-am install-exec install-exec-am install-info \
install-info-am install-libLTLIBRARIES \
install-library_includeHEADERS install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \
pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am \
uninstall-binPROGRAMS uninstall-info-am \
uninstall-libLTLIBRARIES uninstall-library_includeHEADERS
@ -1182,27 +1154,6 @@ install_mod: modules
dox:
cd docs && doxygen $(PWD)/docs/Doxygen.conf
scripts/fsxs: scripts/fsxs.in
@echo creating fsxs
@sed -e "s,@MODULES_DIR\@,$(PREFIX)/mod," \
-e "s,@LIB_DIR\@,$(PREFIX)/lib," \
-e "s,@BIN_DIR\@,$(PREFIX)/bin," \
-e "s,@INC_DIR\@,$(PREFIX)/include," \
-e "s,@CFG_DIR\@,$(PREFIX)/conf," \
-e "s,@DB_DIR\@,$(PREFIX)/db," \
-e "s,@PREFIX\@,$(PREFIX)," \
-e "s,@CC\@,$(CC)," \
-e "s,@LD\@,$(CC)," \
-e "s,@INSTALL\@,$(INSTALL)," \
-e "s,@MKINSTALLDIRS\@,$(mkdir_p)," \
\
-e "s|@CFLAGS\@|$(CFLAGS) $(shell $(APR_CONFIG) --cflags --cppflags)|" \
-e "s|@INCLUDES\@|-I$(PREFIX)/include $(shell $(APR_CONFIG) --includes) $(shell $(APU_CONFIG) --includes)|" \
-e "s|@SOLINK\@|$(SOLINK)|" \
-e "s|@LDFLAGS\@|-L$(PREFIX)/lib|" \
-e "s|@LIBS\@|-lfreeswitch|" \
scripts/fsxs.in > scripts/fsxs
eclean: clean
rm -f `find . -type f -name \*~`
rm -f `find . -type f -name \.*~`

323
configure vendored
View File

@ -466,7 +466,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PRTDIAG WANT_DEBUG_TRUE WANT_DEBUG_FALSE new_AM_CFLAGS new_AM_LDFLAGS SOLINK DYNAMIC_LIB_EXTEN LIBOBJS voidp_size short_value int_value long_value int64_value size_t_value ssize_t_value int64_t_fmt uint64_t_fmt ssize_t_fmt size_t_fmt CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar switch_srcdir switch_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PRTDIAG WANT_DEBUG_TRUE WANT_DEBUG_FALSE SWITCH_AM_CFLAGS SWITCH_AM_LDFLAGS SOLINK DYNAMIC_LIB_EXTEN LIBOBJS voidp_size short_value int_value long_value int64_value size_t_value ssize_t_value int64_t_fmt uint64_t_fmt ssize_t_fmt size_t_fmt CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1963,6 +1963,12 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
# Absolute source/build directory
switch_srcdir=`(cd $srcdir && pwd)`
switch_builddir=`pwd`
#Set default language
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@ -3843,7 +3849,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3846 "configure"' > conftest.$ac_ext
echo '#line 3852 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -5442,7 +5448,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:5445:" \
echo "$as_me:5451:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -6505,11 +6511,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6508: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6514: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6512: \$? = $ac_status" >&5
echo "$as_me:6518: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -6773,11 +6779,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6776: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6782: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6780: \$? = $ac_status" >&5
echo "$as_me:6786: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -6877,11 +6883,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6880: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6886: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:6884: \$? = $ac_status" >&5
echo "$as_me:6890: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -9222,7 +9228,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9225 "configure"
#line 9231 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9322,7 +9328,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9325 "configure"
#line 9331 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11662,11 +11668,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11665: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11671: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11669: \$? = $ac_status" >&5
echo "$as_me:11675: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -11766,11 +11772,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11769: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11775: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11773: \$? = $ac_status" >&5
echo "$as_me:11779: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -13336,11 +13342,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13339: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13345: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13343: \$? = $ac_status" >&5
echo "$as_me:13349: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -13440,11 +13446,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13443: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13449: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13447: \$? = $ac_status" >&5
echo "$as_me:13453: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -15643,11 +15649,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15646: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15652: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15650: \$? = $ac_status" >&5
echo "$as_me:15656: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -15911,11 +15917,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15914: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15920: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15918: \$? = $ac_status" >&5
echo "$as_me:15924: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -16015,11 +16021,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16018: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16024: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:16022: \$? = $ac_status" >&5
echo "$as_me:16028: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -19994,84 +20000,205 @@ else
fi
# set defaults for use on all platforms
SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_srcdir} -I${prefix}/include"
SWITCH_AM_LDFLAGS="-L${prefix}/lib -lm -L/usr/local/lib/db42 -L/usr/local/lib"
#set SOLINK variable based on compiler and host
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
case "$host" in
*-darwin*)
SOLINK="-dynamic -bundle -force-flat-namespace"
;;
*)
SOLINK="-shared -Xlinker -x"
;;
esac
else
{ { echo "$as_me:$LINENO: error: Please update configure.in with SOLINK values for your compiler" >&5
echo "$as_me: error: Please update configure.in with SOLINK values for your compiler" >&2;}
{ (exit 1); exit 1; }; }
fi
# set DYNAMIC_LIB_EXTEN
# we should really be using libtool so we don't need to do this
case "$host" in
*-solaris2*)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-DPATH_MAX=2048 -KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
IN_LINE=""
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-DPATH_MAX=2048 -fPIC"
new_AM_LDFLAGS=""
IN_LINE=inline
fi
DYNAMIC_LIB_EXTEN="so"
;;
*-darwin*)
if test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-dynamic -bundle -force-flat-namespace"
new_AM_CFLAGS="-DMACOSX"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="dylib"
IN_LINE=inline
;;
x86_64-*-linux-gnu)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
i*6-*-linux-gnu)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fpic"
new_AM_LDFLAGS=""
fi
IN_LINE=inline
DYNAMIC_LIB_EXTEN="so"
;;
*)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
*-darwin*)
DYNAMIC_LIB_EXTEN="dylib"
;;
*cygwin* | *mingw*)
DYNAMIC_LIB_EXTEN="dll"
;;
*)
DYNAMIC_LIB_EXTEN="so"
;;
esac
# tweak compiler specific flags
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
if test "x$SWITCH_AM_CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting SWITCH_AM_CFLAGS to \"-KPIC\""
SWITCH_AM_CFLAGS="-KPIC"
else
apr_addto_bugger="-KPIC"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $SWITCH_AM_CFLAGS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS="$SWITCH_AM_CFLAGS $i"
fi
done
fi
if test "x$SWITCH_AM_CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting SWITCH_AM_CFLAGS to \"-DPIC\""
SWITCH_AM_CFLAGS="-DPIC"
else
apr_addto_bugger="-DPIC"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $SWITCH_AM_CFLAGS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS="$SWITCH_AM_CFLAGS $i"
fi
done
fi
if test "x$SWITCH_AM_LDFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting SWITCH_AM_LDFLAGS to \"-R${prefix}/lib\""
SWITCH_AM_LDFLAGS="-R${prefix}/lib"
else
apr_addto_bugger="-R${prefix}/lib"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $SWITCH_AM_LDFLAGS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to SWITCH_AM_LDFLAGS"
SWITCH_AM_LDFLAGS="$SWITCH_AM_LDFLAGS $i"
fi
done
fi
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
if test "x$SWITCH_AM_CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting SWITCH_AM_CFLAGS to \"-fPIC\""
SWITCH_AM_CFLAGS="-fPIC"
else
apr_addto_bugger="-fPIC"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $SWITCH_AM_CFLAGS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS="$SWITCH_AM_CFLAGS $i"
fi
done
fi
fi
# tweak platform specific flags
case "$host" in
*-darwin*)
if test "x$SWITCH_AM_CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting SWITCH_AM_CFLAGS to \"-DMACOSX\""
SWITCH_AM_CFLAGS="-DMACOSX"
else
apr_addto_bugger="-DMACOSX"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $SWITCH_AM_CFLAGS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS="$SWITCH_AM_CFLAGS $i"
fi
done
fi
if test "x$SWITCH_AM_CFLAGS" = "x-fPIC"; then
test "x$silent" != "xyes" && echo " nulling SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS=""
else
apr_new_bugger=""
apr_removed=0
for i in $SWITCH_AM_CFLAGS; do
if test "x$i" != "x-fPIC"; then
apr_new_bugger="$apr_new_bugger $i"
else
apr_removed=1
fi
done
if test $apr_removed = "1"; then
test "x$silent" != "xyes" && echo " removed \"-fPIC\" from SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS=$apr_new_bugger
fi
fi
;;
*-solaris2*)
if test "x$SWITCH_AM_CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting SWITCH_AM_CFLAGS to \"-DPATH_MAX=2048\""
SWITCH_AM_CFLAGS="-DPATH_MAX=2048"
else
apr_addto_bugger="-DPATH_MAX=2048"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $SWITCH_AM_CFLAGS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to SWITCH_AM_CFLAGS"
SWITCH_AM_CFLAGS="$SWITCH_AM_CFLAGS $i"
fi
done
fi
;;
esac
cat >>confdefs.h <<_ACEOF
#define inline $IN_LINE
_ACEOF
cat >>confdefs.h <<_ACEOF
#define __inline__ $IN_LINE
_ACEOF
# Checks for header files.
@ -25574,6 +25701,8 @@ s,@am__leading_dot@,$am__leading_dot,;t t
s,@AMTAR@,$AMTAR,;t t
s,@am__tar@,$am__tar,;t t
s,@am__untar@,$am__untar,;t t
s,@switch_srcdir@,$switch_srcdir,;t t
s,@switch_builddir@,$switch_builddir,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@ -25620,8 +25749,8 @@ s,@LIBTOOL@,$LIBTOOL,;t t
s,@PRTDIAG@,$PRTDIAG,;t t
s,@WANT_DEBUG_TRUE@,$WANT_DEBUG_TRUE,;t t
s,@WANT_DEBUG_FALSE@,$WANT_DEBUG_FALSE,;t t
s,@new_AM_CFLAGS@,$new_AM_CFLAGS,;t t
s,@new_AM_LDFLAGS@,$new_AM_LDFLAGS,;t t
s,@SWITCH_AM_CFLAGS@,$SWITCH_AM_CFLAGS,;t t
s,@SWITCH_AM_LDFLAGS@,$SWITCH_AM_LDFLAGS,;t t
s,@SOLINK@,$SOLINK,;t t
s,@DYNAMIC_LIB_EXTEN@,$DYNAMIC_LIB_EXTEN,;t t
s,@LIBOBJS@,$LIBOBJS,;t t

View File

@ -8,9 +8,16 @@ AM_INIT_AUTOMAKE(libfreeswitch,0.1)
AC_CONFIG_SRCDIR([src/switch.c])
AC_CONFIG_HEADER([src/include/switch_private.h])
AC_PREFIX_DEFAULT(/usr/local/freeswitch)
dnl Setup the directory macros now
# Absolute source/build directory
switch_srcdir=`(cd $srcdir && pwd)`
switch_builddir=`pwd`
AC_SUBST(switch_srcdir)
AC_SUBST(switch_builddir)
#Set default language
AC_LANG_C
# Checks for programs.
@ -43,76 +50,64 @@ fi
AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
# set defaults for use on all platforms
SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_srcdir} -I${prefix}/include"
SWITCH_AM_LDFLAGS="-L${prefix}/lib -lm -L/usr/local/lib/db42 -L/usr/local/lib"
#set SOLINK variable based on compiler and host
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
case "$host" in
*-darwin*)
SOLINK="-dynamic -bundle -force-flat-namespace"
;;
*)
SOLINK="-shared -Xlinker -x"
;;
esac
else
AC_ERROR([Please update configure.in with SOLINK values for your compiler])
fi
# set DYNAMIC_LIB_EXTEN
# we should really be using libtool so we don't need to do this
case "$host" in
*-solaris2*)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-DPATH_MAX=2048 -KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
IN_LINE=""
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-DPATH_MAX=2048 -fPIC"
new_AM_LDFLAGS=""
IN_LINE=inline
fi
DYNAMIC_LIB_EXTEN="so"
;;
*-darwin*)
if test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-dynamic -bundle -force-flat-namespace"
new_AM_CFLAGS="-DMACOSX"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="dylib"
IN_LINE=inline
;;
x86_64-*-linux-gnu)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
i*6-*-linux-gnu)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fpic"
new_AM_LDFLAGS=""
fi
IN_LINE=inline
DYNAMIC_LIB_EXTEN="so"
;;
*)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-L${prefix}/lib -R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
*-darwin*)
DYNAMIC_LIB_EXTEN="dylib"
;;
*cygwin* | *mingw*)
DYNAMIC_LIB_EXTEN="dll"
;;
*)
DYNAMIC_LIB_EXTEN="so"
;;
esac
AC_SUBST(new_AM_CFLAGS)
AC_SUBST(new_AM_LDFLAGS)
# tweak compiler specific flags
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
APR_ADDTO(SWITCH_AM_CFLAGS, -KPIC)
APR_ADDTO(SWITCH_AM_CFLAGS, -DPIC)
APR_ADDTO(SWITCH_AM_LDFLAGS, -R${prefix}/lib)
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
fi
# tweak platform specific flags
case "$host" in
*-darwin*)
APR_ADDTO(SWITCH_AM_CFLAGS, -DMACOSX)
APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
;;
*-solaris2*)
APR_ADDTO(SWITCH_AM_CFLAGS, -DPATH_MAX=2048)
;;
esac
AC_SUBST(SWITCH_AM_CFLAGS)
AC_SUBST(SWITCH_AM_LDFLAGS)
AC_SUBST(SOLINK)
AC_SUBST(DYNAMIC_LIB_EXTEN)
AC_DEFINE_UNQUOTED([inline],[$IN_LINE],[sunpro is bad at inline])
AC_DEFINE_UNQUOTED([__inline__],[$IN_LINE],[sunpro is bad at inline])
# Checks for header files.
AC_HEADER_DIRENT

View File

@ -136,9 +136,6 @@
/* Version number of package */
#undef VERSION
/* sunpro is bad at inline */
#undef __inline__
/* Define to empty if `const' does not conform to ANSI C. */
#undef const

View File

@ -33,6 +33,10 @@
*
*/
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500
#endif
#include <switch.h>
/* pid filename: Stores the process id of the freeswitch process */