]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4753 --resolve this should properly detect it everywhere
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 23 Oct 2012 17:14:51 +0000 (13:14 -0400)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 23 Oct 2012 17:14:51 +0000 (13:14 -0400)
Makefile.am
configure.in
libs/apr/.update
libs/apr/Makefile.in
libs/apr/configure.in
libs/apr/threadproc/unix/thread.c
libs/sofia-sip/.update
libs/sofia-sip/Makefile.am
libs/sofia-sip/configure.ac
libs/sofia-sip/libsofia-sip-ua/su/su_pthread_port.c
src/mod/endpoints/mod_sofia/Makefile.am

index f11f891aacea886f1a4d1bf09a3f9bf09c81adad..036baafeba3c6109d1fbd52dfd29be31fdcfa6ae 100644 (file)
@@ -450,7 +450,10 @@ libs/curl/lib/libcurl.la: libs/curl libs/curl/Makefile
        @cd libs/curl && $(MAKE)
        @$(TOUCH_TARGET)
 
-libs/apr/libapr-1.la: libs/apr libs/apr/.update
+libs/apr/Makefile: libs/apr/Makefile.in libs/apr/config.status libs/apr libs/apr/.update
+       @cd libs/apr && ./config.status
+
+libs/apr/libapr-1.la: libs/apr/Makefile
        touch src/include/switch.h
        @cd libs/apr && $(MAKE)
        @$(TOUCH_TARGET)
index 89cf47d79e973f4e9baf7b97bce3aa9359620880..2c4835afc2aaa90b00624127253ce9c6f61efbe9 100644 (file)
@@ -559,6 +559,8 @@ AX_HAVE_CPU_SET
 AC_CHECK_LIB(rt, clock_gettime, [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])])
 AC_CHECK_LIB(rt, clock_getres, [AC_DEFINE(HAVE_CLOCK_GETRES, 1, [Define if you have clock_getres()])])
 AC_CHECK_LIB(rt, clock_nanosleep, [AC_DEFINE(HAVE_CLOCK_NANOSLEEP, 1, [Define if you have clock_nanosleep()])])
+AC_CHECK_LIB(pthread, pthread_setschedprio, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1, [Define if you have pthread_setschedprio()])])
+
 AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
 
 AC_CHECK_FILE(/dev/ptmx, [AC_DEFINE(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx])])
index 4452df8ef3af8c468ce42d9ea3e860db9edf2b16..a55ae9a4f41db0a8f864b2a8961b71aa3ab04904 100644 (file)
@@ -1 +1 @@
-Thu Sep 27 13:36:14 CDT 2012
+Tue Oct 23 13:13:30 EDT 2012
index fe6ad501c92c3a766b7af024214fff4478cc5c9d..5aef325fe57dfe7f353e158dbb0f70daae7f3770 100644 (file)
@@ -66,6 +66,18 @@ apr-config.out: $(APR_CONFIG)
 build/apr_rules.out: build/apr_rules.mk
        sed 's,^\(apr_build.*=\).*$$,\1$(installbuilddir),' < build/apr_rules.mk > $@
 
+.PRECIOUS: Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_blddir)/config.status
+       cd $(srcdir) && ./config.status
+
+$(top_blddir)/config.status: $(top_srcdir)/configure
+       $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(top_srcdir)/configure.in
+       cd $(srcdir) && autoconf
+       cd $(srcdir) && autoheader
+
 install: $(TARGET_LIB) apr-config.out build/apr_rules.out
        $(APR_MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(installbuilddir) \
                     $(DESTDIR)$(libdir)/pkgconfig $(DESTDIR)$(includedir)
index 68c030e124cd7654ccabefeaaafde5cb9d8f013a..412ee7e9372f1b15d13fea1884724b729cd012df 100644 (file)
@@ -550,6 +550,7 @@ AC_CHECK_LIB(truerand, main)
 AC_SEARCH_LIBS(modf, m)
 AC_CHECK_LIB(dl, dlopen)
 
+
 dnl ----------------------------- Checking for Threads
 echo "${nl}Checking for Threads..."
 
@@ -1619,6 +1620,8 @@ APR_CHECK_DEFINE_FILES(POLLIN, poll.h sys/poll.h)
 if test "$threads" = "1"; then
     APR_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
     AC_CHECK_FUNCS(pthread_mutexattr_setpshared)
+    AC_CHECK_LIB(pthread, pthread_setschedprio, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1, [Define if you have pthread_setschedprio()])])
+
     # Some systems have setpshared and define PROCESS_SHARED, but don't 
     # really support PROCESS_SHARED locks.  So, we must validate that we 
     # can go through the steps without receiving some sort of system error.
index 786f83069e633b07c3de25f28af345e8d53e60fe..391e5368c88d80a7c96eacae46d90f8f1a46e998 100644 (file)
@@ -174,7 +174,8 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
     }
 
     if ((stat = pthread_create((*new)->td, temp, dummy_worker, (*new))) == 0) {
-#ifndef __APPLE__
+
+#ifdef HAVE_PTHREAD_SETSCHEDPRIO
                if (attr && attr->priority) {
                        pthread_t *thread = (*new)->td;
                        pthread_setschedprio(*thread, attr->priority);
index ecae8fc8402ffb9e109267d23004e5825acf3b33..22f5eeb029700df298a8205896028e847f37c8ef 100644 (file)
@@ -1 +1 @@
-Mon Oct  1 12:24:45 CDT 2012
+Tue Oct 23 13:13:35 EDT 2012
index 069007d30038ac1cad89566d4e9b90dd2c042514..727969586575e3d41187172a945d548858c158dc 100644 (file)
@@ -40,6 +40,9 @@ dist_man_MANS =
 #              man/man1/localinfo.1 man/man1/addrinfo.1 \
 #              man/man1/stunc.1 man/man1/sip-dig.1
 
+noop:
+       @echo ok
+
 $(dist_man_MANS): manpages
 
 manpages:
index 196d81515762b3a423becba1179f88e6a8c03129..1bce33e178ad41835dd38b3a63b54359f301d9d8 100644 (file)
@@ -254,6 +254,9 @@ if test x"$have_check" = "xyes"; then
 fi
 AC_CHECK_HEADERS([fnmatch.h])
 
+AC_CHECK_LIB(pthread, pthread_setschedprio, [AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1, [Define if you have pthread_setschedprio()])])
+
+
 dnl dl is currently used only in testing
 AC_CHECK_LIB([dl], [dlopen], [
    dnl Note: -ldl is not added to LIBS
index db314b28ddf7f00e65c3db251b40a24255691c66..5eb391f38d62028c7cc3ef9103111c6f1328a2e1 100644 (file)
@@ -269,13 +269,10 @@ int su_pthreaded_port_start(su_port_create_f *create,
   pthread_mutex_lock(arg.mutex);
   if (pthread_create(&tid, &attr, su_pthread_port_clone_main, &arg) == 0) {
 
-#if defined (WIN32)
-    /* this needs to be revisited when pthread for Windows supports thread priority settings */
-#elif defined (__APPLE__)
-    /* no such function on Apple */
-#else
+#ifdef HAVE_PTHREAD_SETSCHEDPRIO
          pthread_setschedprio(tid, 99);
 #endif
+
     pthread_cond_wait(arg.cv, arg.mutex);
     thread_created = 1;
   }
index efd6b2c38594a8ebf6928f7aa46a1853ee953cf6..7828c5eb49e33062b4f82d28a80a7d7a363c1a1e 100644 (file)
@@ -41,6 +41,7 @@ BUILT_SOURCES = $(SOFIALA)
 $(mod_sofia_la_SOURCES) : $(BUILT_SOURCES)
 
 $(SOFIALA): $(SOFIA_DIR) $(SOFIA_DIR)/.update
+       cd $(SOFIA_BUILDDIR) && $(MAKE) noop
        cd $(SOFIA_BUILDDIR) && $(MAKE) SOFIA_CFLAGS="$(SWITCH_AM_CFLAGS)"
        $(TOUCH_TARGET)