]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add new generated shell script for portable download/untar
authorMichael Jerris <mike@jerris.com>
Wed, 14 Mar 2007 03:02:46 +0000 (03:02 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 14 Mar 2007 03:02:46 +0000 (03:02 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4588 d0543943-73ff-0310-b7d9-9358b9ac24b2

Makefile.in
build/getlib.sh.in [new file with mode: 0755]
configure
configure.in
src/mod/Makefile.in

index 730f76f4d167f531e4e42b42995f46e0bb8cde2a..bc1f28cb249b2821915fed5770eebc2577db5f28 100644 (file)
@@ -44,6 +44,7 @@ host_triplet = @host@
 bin_PROGRAMS = freeswitch$(EXEEXT)
 DIST_COMMON = README $(am__configure_deps) $(library_include_HEADERS) \
        $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(top_srcdir)/build/getlib.sh.in \
        $(top_srcdir)/build/modmake.rules.in $(top_srcdir)/configure \
        $(top_srcdir)/src/include/switch_am_config.h.in \
        $(top_srcdir)/src/include/switch_private.h.in AUTHORS COPYING \
@@ -68,7 +69,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno configure.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/include/switch_private.h
-CONFIG_CLEAN_FILES = src/include/switch_am_config.h \
+CONFIG_CLEAN_FILES = src/include/switch_am_config.h build/getlib.sh \
        build/modmake.rules
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
@@ -166,6 +167,7 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CRASHPROT_FALSE = @CRASHPROT_FALSE@
 CRASHPROT_TRUE = @CRASHPROT_TRUE@
+CURL = @CURL@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -216,9 +218,12 @@ STRIP = @STRIP@
 SWITCH_AM_CFLAGS = @SWITCH_AM_CFLAGS@
 SWITCH_AM_CXXFLAGS = @SWITCH_AM_CXXFLAGS@
 SWITCH_AM_LDFLAGS = @SWITCH_AM_LDFLAGS@
+TAR = @TAR@
 VERSION = @VERSION@
 WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@
 WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@
+WGET = @WGET@
+ZCAT = @ZCAT@
 ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
@@ -416,6 +421,8 @@ distclean-hdr:
        -rm -f src/include/switch_private.h src/include/stamp-h1
 src/include/switch_am_config.h: $(top_builddir)/config.status $(top_srcdir)/src/include/switch_am_config.h.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
+build/getlib.sh: $(top_builddir)/config.status $(top_srcdir)/build/getlib.sh.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
 build/modmake.rules: $(top_builddir)/config.status $(top_srcdir)/build/modmake.rules.in
        cd $(top_builddir) && $(SHELL) ./config.status $@
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
diff --git a/build/getlib.sh.in b/build/getlib.sh.in
new file mode 100755 (executable)
index 0000000..fd19295
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+TAR=@TAR@
+ZCAT=@ZCAT@
+WGET=@WGET@
+CURL=@CURL@
+
+if [ -f $WGET ] ; then
+    DOWNLOAD_CMD=$WGET
+else
+    if [ -f $CURL ] ; then
+        DOWNLOAD_CMD="$CURL -O"
+    fi
+fi
+
+base=http://svn.freeswitch.org/downloads/libs
+tarfile=$1
+
+if [ ! -d $tarfile ] ; then
+    uncompressed=`echo $tarfile | sed "s/\.tar\.gz//g"`
+    uncompressed=`echo $uncompressed | sed "s/\.tgz//g"`
+
+    if [ ! -f $tarfile ] ; then
+       rm -fr $uncompressed
+       $DOWNLOAD_CMD $base/$tarfile
+       if [ ! -f $tarfile ] ; then
+           echo cannot find $tarfile
+           exit 1
+       fi
+    fi
+    if [ ! -d $uncompressed ] ; then
+       $ZCAT -c -d $tarfile | $TAR xf -
+    fi
+fi
+
+exit 0
+
index 7c12a8a66fa73c68901ca701acdccef3d0f23115..b7c07d2222127638c67bdad5a93f1a09c66a70cb 100755 (executable)
--- a/configure
+++ b/configure
@@ -490,7 +490,7 @@ ac_subdirs_all="$ac_subdirs_all libs/sofia-sip"
 ac_subdirs_all="$ac_subdirs_all libs/speex"
 ac_subdirs_all="$ac_subdirs_all libs/xmlrpc-c"
 ac_subdirs_all="$ac_subdirs_all libs/portaudio"
-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 moddir 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_CXXFLAGS 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 subdirs 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 moddir 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_CXXFLAGS 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 ZCAT TAR WGET CURL CRASHPROT_TRUE CRASHPROT_FALSE ISLINUX_TRUE ISLINUX_FALSE ISMAC_TRUE ISMAC_FALSE IS64BITLINUX_TRUE IS64BITLINUX_FALSE subdirs LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -25060,6 +25060,183 @@ esac
 
 
 
+for ac_prog in gunzip gzcat gzip zcat
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ZCAT+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ZCAT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ZCAT="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+ZCAT=$ac_cv_path_ZCAT
+
+if test -n "$ZCAT"; then
+  echo "$as_me:$LINENO: result: $ZCAT" >&5
+echo "${ECHO_T}$ZCAT" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ZCAT" && break
+done
+
+for ac_prog in gtar tar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TAR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $TAR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+TAR=$ac_cv_path_TAR
+
+if test -n "$TAR"; then
+  echo "$as_me:$LINENO: result: $TAR" >&5
+echo "${ECHO_T}$TAR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$TAR" && break
+done
+
+for ac_prog in wget
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_WGET+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $WGET in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_WGET="$WGET" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_WGET="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+WGET=$ac_cv_path_WGET
+
+if test -n "$WGET"; then
+  echo "$as_me:$LINENO: result: $WGET" >&5
+echo "${ECHO_T}$WGET" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$WGET" && break
+done
+
+for ac_prog in curl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_CURL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $CURL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CURL="$CURL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CURL="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+CURL=$ac_cv_path_CURL
+
+if test -n "$CURL"; then
+  echo "$as_me:$LINENO: result: $CURL" >&5
+echo "${ECHO_T}$CURL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$CURL" && break
+done
+
+
 # Check whether --enable-crash-protection or --disable-crash-protection was given.
 if test "${enable_crash_protection+set}" = set; then
   enableval="$enable_crash_protection"
@@ -25079,7 +25256,7 @@ else
 fi
 
 
-                                        ac_config_files="$ac_config_files Makefile src/mod/Makefile src/include/switch_am_config.h build/modmake.rules"
+                                                  ac_config_files="$ac_config_files Makefile src/mod/Makefile src/include/switch_am_config.h build/getlib.sh build/modmake.rules"
 
 
 
@@ -25805,6 +25982,7 @@ do
   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
   "src/mod/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mod/Makefile" ;;
   "src/include/switch_am_config.h" ) CONFIG_FILES="$CONFIG_FILES src/include/switch_am_config.h" ;;
+  "build/getlib.sh" ) CONFIG_FILES="$CONFIG_FILES build/getlib.sh" ;;
   "build/modmake.rules" ) CONFIG_FILES="$CONFIG_FILES build/modmake.rules" ;;
   "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
   "src/include/switch_private.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/include/switch_private.h" ;;
@@ -25981,6 +26159,10 @@ s,@int64_t_fmt@,$int64_t_fmt,;t t
 s,@uint64_t_fmt@,$uint64_t_fmt,;t t
 s,@ssize_t_fmt@,$ssize_t_fmt,;t t
 s,@size_t_fmt@,$size_t_fmt,;t t
+s,@ZCAT@,$ZCAT,;t t
+s,@TAR@,$TAR,;t t
+s,@WGET@,$WGET,;t t
+s,@CURL@,$CURL,;t t
 s,@CRASHPROT_TRUE@,$CRASHPROT_TRUE,;t t
 s,@CRASHPROT_FALSE@,$CRASHPROT_FALSE,;t t
 s,@ISLINUX_TRUE@,$ISLINUX_TRUE,;t t
index 72011abc830df81d7de7e8cefe21f0cc4e21a85a..5586b2372edb99462b09e21823bca9c51b8b871e 100644 (file)
@@ -274,6 +274,11 @@ AC_SUBST(size_t_fmt)
 
 
 
+AC_PATH_PROGS(ZCAT, gunzip gzcat gzip zcat)
+AC_PATH_PROGS(TAR, gtar tar)
+AC_PATH_PROGS(WGET, wget)
+AC_PATH_PROGS(CURL, curl)
+
 AC_ARG_ENABLE(crash-protection,     
        [  --enable-crash-protection         Compile with CRASH Protection],,[enable_crash_prot="no"])
 
@@ -282,6 +287,7 @@ AM_CONDITIONAL([CRASHPROT],[test "x$enable_crash_prot" != "xno"])
 AC_CONFIG_FILES([Makefile
                 src/mod/Makefile
                 src/include/switch_am_config.h
+                build/getlib.sh
                 build/modmake.rules])
 
 AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
index 110d10c0a28fa1af5836e77c1d238eae9a36fe0c..307cefbebc5e6c8ee0b25c0204a303d306dd7818 100644 (file)
@@ -71,6 +71,7 @@ CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CRASHPROT_FALSE = @CRASHPROT_FALSE@
 CRASHPROT_TRUE = @CRASHPROT_TRUE@
+CURL = @CURL@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
@@ -121,9 +122,12 @@ STRIP = @STRIP@
 SWITCH_AM_CFLAGS = @SWITCH_AM_CFLAGS@
 SWITCH_AM_CXXFLAGS = @SWITCH_AM_CXXFLAGS@
 SWITCH_AM_LDFLAGS = @SWITCH_AM_LDFLAGS@
+TAR = @TAR@
 VERSION = @VERSION@
 WANT_DEBUG_FALSE = @WANT_DEBUG_FALSE@
 WANT_DEBUG_TRUE = @WANT_DEBUG_TRUE@
+WGET = @WGET@
+ZCAT = @ZCAT@
 ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@