602013bf35a3a513af73f18c8ee45a041f276179
[feed/telephony.git] / net / freeswitch-stable / patches / 030-fix-configure-ac.patch
1 --- a/configure.ac
2 +++ b/configure.ac
3 @@ -256,30 +256,6 @@ AX_COMPILER_VENDOR
4 # Set CC_FOR_BUILD
5 if test "x${cross_compiling}" = "xyes"; then
6 CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
7 - case "$host" in
8 - arm*-linux-gnueabi*|arm*-*-linux-gnueabi*)
9 - # spandsp modem
10 - ac_cv_file__dev_ptmx=yes
11 - # libjs
12 - export ac_cv_va_copy=yes
13 - # srtp
14 - export ac_cv_file__dev_urandom=yes
15 - # rpl_malloc
16 - export ac_cv_func_realloc_0_nonnull=yes
17 - export ac_cv_func_malloc_0_nonnull=yes
18 - # apr
19 - export ac_cv_func_setpgrp_void=yes
20 - export ac_cv_file__dev_zero=yes
21 - export apr_cv_tcp_nodelay_with_cork=yes
22 - export ac_cv_file_dbd_apr_dbd_mysql_c=no
23 - export ac_cv_sizeof_ssize_t=4
24 - export apr_cv_mutex_recursive=yes
25 - export ac_cv_func_pthread_rwlock_init=yes
26 - export apr_cv_type_rwlock_t=yes
27 - export apr_cv_process_shared_works=yes
28 - export apr_cv_mutex_robust_shared=yes
29 - ;;
30 - esac
31 else
32 CC_FOR_BUILD='$(CC)'
33 fi
34 @@ -662,7 +638,7 @@ AC_ARG_ENABLE(core-pgsql-pkgconfig,
35 [AS_HELP_STRING([--disable-core-pgsql-pkgconfig], [Use pg_config to get PGQSL build options])],[enable_core_pgsql_pkgconfig="$enableval"],[enable_core_pgsql_pkgconfig="yes"])
36
37 if test x"$enable_core_pgsql_support" = x"yes" ; then
38 - AC_PATH_PROG([PG_CONFIG], [pg_config], [no])
39 + AC_PATH_PROG([PG_CONFIG], [pg_config], [no], ["${STAGING_DIR}"/usr/bin])
40 AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
41 if test "$PKG_CONFIG" = "no" \
42 || test x"$enable_core_pgsql_pkgconfig" = x"no" \
43 @@ -1617,13 +1593,7 @@ AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl
44 # -a "x$ac_cv_have_EXTERN_h" != "xno"
45
46 if test "x$ac_cv_have_perl" != "xno"; then
47 - PERL=perl
48 - PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{archlib}'`"
49 - PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE"
50 - PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`"
51 - PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts | sed -e 's|-arch x86_64 -arch i386||'` -DEMBED_PERL"
52 - PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts| sed -e 's|-arch x86_64 -arch i386||'`"
53 - PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`"
54 + PERL_CFLAGS="-w -DMULTIPLICITY ${PERL_CFLAGS} -DEMBED_PERL"
55
56 save_CFLAGS="$CFLAGS"
57 CFLAGS="$PERL_CFLAGS"
58 @@ -1718,24 +1688,12 @@ then
59 if test "$python_has_distutils" != "no" ; then
60 AC_MSG_CHECKING([location of site-packages])
61
62 - PYTHON_SITE_DIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_python_lib(0));'`"
63 -
64 if test -z "$PYTHON_SITE_DIR" ; then
65 AC_MSG_ERROR([Unable to detect python site-packages path])
66 - elif test ! -d "$PYTHON_SITE_DIR" ; then
67 - AC_MSG_ERROR([Path $PYTHON_SITE_DIR returned by python does not exist!])
68 fi
69 AC_MSG_RESULT([$PYTHON_SITE_DIR])
70 AC_SUBST([PYTHON_SITE_DIR], [$PYTHON_SITE_DIR])
71
72 - #
73 - # python distutils found, get settings from python directly
74 - #
75 - PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print(\" \".join(flags));' | sed -e 's/-arch i386//g;s/-arch x86_64//g'`"
76 - PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print(\" \".join(libs));'`"
77 - PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print(\"python\" + sysconfig.get_config_var(\"VERSION\"));'`"
78 - PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"));'`"
79 -
80 # handle python being installed into /usr/local
81 AC_MSG_CHECKING([python libdir])
82 if test -z "`echo $PYTHON_LIBDIR | grep "/usr/lib"`" ; then