mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-26 14:27:14 +00:00 
			
		
		
		
	https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r277738 | tilghman | 2010-07-17 11:59:11 -0500 (Sat, 17 Jul 2010) | 5 lines Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not. (closes issue #17616) Reported by: pprindeville ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # AST_FUNC_FORK
 | |
| # -------------
 | |
| AN_FUNCTION([fork],  [AST_FUNC_FORK])
 | |
| AN_FUNCTION([vfork], [AST_FUNC_FORK])
 | |
| AC_DEFUN([AST_FUNC_FORK],
 | |
| [AC_REQUIRE([AC_TYPE_PID_T])dnl
 | |
| AC_CHECK_HEADERS(vfork.h)
 | |
| AC_CHECK_FUNCS(fork vfork)
 | |
| if test "x$ac_cv_func_fork" = xyes; then
 | |
|   _AST_FUNC_FORK
 | |
| else
 | |
|   ac_cv_func_fork_works=$ac_cv_func_fork
 | |
| fi
 | |
| if test "x$ac_cv_func_fork_works" = xcross; then
 | |
|   case $host in
 | |
|     *-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* )
 | |
|       # Override, as these systems have only a dummy fork() stub
 | |
|       ac_cv_func_fork_works=no
 | |
|       ;;
 | |
|     *)
 | |
|       ac_cv_func_fork_works=yes
 | |
|       ;;
 | |
|   esac
 | |
|   AC_MSG_WARN([result $ac_cv_func_fork_works guessed because of cross compilation])
 | |
| fi
 | |
| ac_cv_func_vfork_works=$ac_cv_func_vfork
 | |
| if test "x$ac_cv_func_vfork" = xyes; then
 | |
|   _AC_FUNC_VFORK
 | |
| fi;
 | |
| if test "x$ac_cv_func_fork_works" = xcross; then
 | |
|   ac_cv_func_vfork_works=$ac_cv_func_vfork
 | |
|   AC_MSG_WARN([result $ac_cv_func_vfork_works guessed because of cross compilation])
 | |
| fi
 | |
| 
 | |
| if test "x$ac_cv_func_vfork_works" = xyes; then
 | |
|   AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define to 1 if `vfork' works.])
 | |
| else
 | |
|   AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.])
 | |
| fi
 | |
| if test "x$ac_cv_func_fork_works" = xyes; then
 | |
|   AC_DEFINE(HAVE_WORKING_FORK, 1, [Define to 1 if `fork' works.])
 | |
|   PBX_WORKING_FORK=1
 | |
|   AC_SUBST(PBX_WORKING_FORK)
 | |
| fi
 | |
| ])# AST_FUNC_FORK
 | |
| 
 | |
| 
 | |
| # _AST_FUNC_FORK
 | |
| # -------------
 | |
| AC_DEFUN([_AST_FUNC_FORK],
 | |
|   [AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works,
 | |
|     [AC_RUN_IFELSE(
 | |
|       [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
 | |
| 	[
 | |
| 	  /* By Ruediger Kuhlmann. */
 | |
| 	  return fork () < 0;
 | |
| 	])],
 | |
|       [ac_cv_func_fork_works=yes],
 | |
|       [ac_cv_func_fork_works=no],
 | |
|       [ac_cv_func_fork_works=cross])])]
 | |
| )# _AST_FUNC_FORK
 |