[Freeswitch-svn] [commit] r4531 - in freeswitch/trunk/libs/codec/g726: . build build/config

Freeswitch SVN mikej at freeswitch.org
Sun Mar 11 06:07:55 EDT 2007


Author: mikej
Date: Sun Mar 11 06:07:54 2007
New Revision: 4531

Added:
   freeswitch/trunk/libs/codec/g726/acsite.m4
   freeswitch/trunk/libs/codec/g726/build/   (props changed)
      - copied from r4528, /freeswitch/private/packaging/libs/codec/g726/build/
   freeswitch/trunk/libs/codec/g726/build/config/
      - copied from r4528, /freeswitch/private/packaging/libs/codec/g726/build/config/
   freeswitch/trunk/libs/codec/g726/configure.gnu
Modified:
   freeswitch/trunk/libs/codec/g726/Makefile.am
   freeswitch/trunk/libs/codec/g726/build/config/ac_cflags_gcc_option.m4
   freeswitch/trunk/libs/codec/g726/build/config/ac_cflags_sun_option.m4
   freeswitch/trunk/libs/codec/g726/build/config/ac_gcc_archflag.m4
   freeswitch/trunk/libs/codec/g726/build/config/ac_gcc_x86_cpuid.m4
   freeswitch/trunk/libs/codec/g726/build/config/ac_prog_gzip.m4
   freeswitch/trunk/libs/codec/g726/build/config/ac_prog_wget.m4
   freeswitch/trunk/libs/codec/g726/build/config/ax_cc_maxopt.m4
   freeswitch/trunk/libs/codec/g726/build/config/ax_cflags_warn_all_ansi.m4
   freeswitch/trunk/libs/codec/g726/build/config/ax_check_compiler_flags.m4
   freeswitch/trunk/libs/codec/g726/build/config/ax_compiler_vendor.m4
   freeswitch/trunk/libs/codec/g726/configure.in

Log:
updated autotools for libg726.  Remove hardcoded gcc options.

Modified: freeswitch/trunk/libs/codec/g726/Makefile.am
==============================================================================
--- freeswitch/trunk/libs/codec/g726/Makefile.am	(original)
+++ freeswitch/trunk/libs/codec/g726/Makefile.am	Sun Mar 11 06:07:54 2007
@@ -3,9 +3,9 @@
 AUTOMAKE_OPTS= gnu
 NAME=libg726
 
-AM_CC=gcc
-AM_CFLAGS	= -Wall -O3 -funroll-loops
+AM_CFLAGS   = $(new_AM_CFLAGS) -I./src/include
 AM_CPPFLAGS = $(AM_CFLAGS)
+AM_LDFLAGS  = $(new_AM_LDFLAGS) -lm
 
 lib_LTLIBRARIES		= libg726.la
 libg726_la_SOURCES	= src/g726_16.c \

Added: freeswitch/trunk/libs/codec/g726/acsite.m4
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/codec/g726/acsite.m4	Sun Mar 11 06:07:54 2007
@@ -0,0 +1,6 @@
+m4_include([build/config/ax_compiler_vendor.m4])
+m4_include([build/config/ax_cflags_warn_all_ansi.m4])
+m4_include([build/config/ax_cc_maxopt.m4])
+m4_include([build/config/ax_check_compiler_flags.m4])
+m4_include([build/config/ac_gcc_archflag.m4])
+m4_include([build/config/ac_gcc_x86_cpuid.m4])

Modified: freeswitch/trunk/libs/codec/g726/build/config/ac_cflags_gcc_option.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ac_cflags_sun_option.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ac_gcc_archflag.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ac_gcc_x86_cpuid.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ac_prog_gzip.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ac_prog_wget.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ax_cc_maxopt.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ax_cflags_warn_all_ansi.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ax_check_compiler_flags.m4
==============================================================================

Modified: freeswitch/trunk/libs/codec/g726/build/config/ax_compiler_vendor.m4
==============================================================================

Added: freeswitch/trunk/libs/codec/g726/configure.gnu
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/codec/g726/configure.gnu	Sun Mar 11 06:07:54 2007
@@ -0,0 +1,2 @@
+#! /bin/sh
+./configure "$@" --disable-shared

Modified: freeswitch/trunk/libs/codec/g726/configure.in
==============================================================================
--- freeswitch/trunk/libs/codec/g726/configure.in	(original)
+++ freeswitch/trunk/libs/codec/g726/configure.in	Sun Mar 11 06:07:54 2007
@@ -3,15 +3,93 @@
 
 AC_PREREQ(2.59)
 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
+AC_CONFIG_AUX_DIR(build)
 AM_INIT_AUTOMAKE(libg726,0.1)
 AC_CONFIG_SRCDIR([src])
 
+#Set default language
+AC_LANG_C
 # Checks for programs.
 AC_PROG_CC
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
 AC_PROG_INSTALL
 
+#Check for compiler vendor
+AX_COMPILER_VENDOR
+
+#  Optimize
+AC_ARG_ENABLE(optimization,
+[AC_HELP_STRING([--enable-optimization],[Set if you want us to add max optimising compiler flags])],[enable_optimizer="$enableval"],[enable_optimizer="no"])
+
+if test "${enable_optimizer}" = "yes" ; then
+        AC_DEFINE([OPTIMZER],[],[Enable Optimization.])
+        AX_CC_MAXOPT
+fi
+
+#  Enable debugging
+AC_ARG_ENABLE(debug,
+[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enable_debug"],[enable_debug="yes"])
+
+if test "${enable_debug}" = "yes"; then
+        AC_DEFINE([DEBUG],[],[Enable extra debugging.])
+        AX_CFLAGS_WARN_ALL_ANSI
+fi
+
+AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
+
+
+case "$host" in
+                *-solaris2*)
+                        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="-Bdynamic -dy -G"
+                                new_AM_CFLAGS="-fPIC"
+                                new_AM_LDFLAGS=""
+                        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"
+                ;;
+                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"
+                ;;
+                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
+                        DYNAMIC_LIB_EXTEN="so"
+                ;;
+esac
+AC_SUBST(new_AM_CFLAGS)
+AC_SUBST(new_AM_LDFLAGS)
+AC_SUBST(SOLINK)
+AC_SUBST(DYNAMIC_LIB_EXTEN)
+
 # Checks for header files.
 AC_HEADER_DIRENT
 AC_HEADER_STDC



More information about the Freeswitch-svn mailing list