added header file checks for io multiplexer and dynamic linker in configure.ac

This commit is contained in:
hyunghwan.chung 2017-05-07 08:58:34 +00:00
parent 63519c1ca3
commit b93bfc9ec6
4 changed files with 67 additions and 18 deletions

25
moo/configure vendored
View File

@ -18850,6 +18850,31 @@ fi
done done
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
if test "x$ac_cv_header_dlfcn_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DLFCN_H 1
_ACEOF
fi
done
for ac_header in sys/devpoll.h sys/epoll.h poll.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in dyncall.h for ac_header in dyncall.h
do : do :
ac_fn_c_check_header_mongrel "$LINENO" "dyncall.h" "ac_cv_header_dyncall_h" "$ac_includes_default" ac_fn_c_check_header_mongrel "$LINENO" "dyncall.h" "ac_cv_header_dyncall_h" "$ac_includes_default"

View File

@ -152,6 +152,8 @@ dnl check header files.
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h wchar.h wctype.h errno.h signal.h fcntl.h dirent.h]) AC_CHECK_HEADERS([stddef.h wchar.h wctype.h errno.h signal.h fcntl.h dirent.h])
AC_CHECK_HEADERS([time.h sys/time.h utime.h spawn.h execinfo.h ucontext.h]) AC_CHECK_HEADERS([time.h sys/time.h utime.h spawn.h execinfo.h ucontext.h])
AC_CHECK_HEADERS([dlfcn.h])
AC_CHECK_HEADERS([sys/devpoll.h sys/epoll.h poll.h])
AC_CHECK_HEADERS([dyncall.h]) AC_CHECK_HEADERS([dyncall.h])
AC_CHECK_HEADERS([xcb/xcb.h]) AC_CHECK_HEADERS([xcb/xcb.h])

View File

@ -62,9 +62,11 @@
# if defined(MOO_ENABLE_LIBLTDL) # if defined(MOO_ENABLE_LIBLTDL)
# include <ltdl.h> # include <ltdl.h>
# define USE_LTDL # define USE_LTDL
# else # elif defined(HAVE_DLFCN_H)
# include <dlfcn.h> # include <dlfcn.h>
# error NOT IMPLEMENTED # error NOT IMPLEMENTED
# else
# error UNSUPPORTED DYNAMIC LINKER
# endif # endif
# if defined(HAVE_TIME_H) # if defined(HAVE_TIME_H)
@ -80,27 +82,38 @@
# include <unistd.h> # include <unistd.h>
# include <fcntl.h> # include <fcntl.h>
#if defined(__sun) && defined(__SVR4)
/* solaris */
# include <sys/devpoll.h>
# define USE_DEVPOLL
# define XPOLLIN POLLIN
# define XPOLLOUT POLLOUT
# define XPOLLERR POLLERR
# define XPOLLHUP POLLHUP
#else
# include <sys/epoll.h>
# define USE_EPOLL
# define XPOLLIN EPOLLIN
# define XPOLLOUT EPOLLOUT
# define XPOLLERR EPOLLERR
# define XPOLLHUP EPOLLHUP
#endif
# if defined(USE_THREAD) # if defined(USE_THREAD)
# include <pthread.h> # include <pthread.h>
# include <sched.h> # include <sched.h>
# endif # endif
# if defined(HAVE_SYS_DEVPOLL_H)
/* solaris */
# include <sys/devpoll.h>
# define USE_DEVPOLL
# define XPOLLIN POLLIN
# define XPOLLOUT POLLOUT
# define XPOLLERR POLLERR
# define XPOLLHUP POLLHUP
# elif defined(HAVE_SYS_EPOLL_H)
/* linux */
# include <sys/epoll.h>
# define USE_EPOLL
# define XPOLLIN EPOLLIN
# define XPOLLOUT EPOLLOUT
# define XPOLLERR EPOLLERR
# define XPOLLHUP EPOLLHUP
# elif defined(HAVE_POLL_H)
# include <poll.h>
# define USE_POLL
# define XPOLLIN POLLIN
# define XPOLLOUT POLLOUT
# define XPOLLERR POLLERR
# define XPOLLHUP POLLHUP
# else
# error UNSUPPORTED MULTIPLEXER
# endif
#endif #endif
#if !defined(MOO_DEFAULT_PFMODPREFIX) #if !defined(MOO_DEFAULT_PFMODPREFIX)

View File

@ -163,6 +163,9 @@
/* Define to 1 if you have the `opendir' function. */ /* Define to 1 if you have the `opendir' function. */
#undef HAVE_OPENDIR #undef HAVE_OPENDIR
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
/* Define to 1 if you have the `powq' function. */ /* Define to 1 if you have the `powq' function. */
#undef HAVE_POWQ #undef HAVE_POWQ
@ -238,9 +241,15 @@
/* Define to 1 if you have the `swapcontext' function. */ /* Define to 1 if you have the `swapcontext' function. */
#undef HAVE_SWAPCONTEXT #undef HAVE_SWAPCONTEXT
/* Define to 1 if you have the <sys/devpoll.h> header file. */
#undef HAVE_SYS_DEVPOLL_H
/* Define to 1 if you have the <sys/dl.h> header file. */ /* Define to 1 if you have the <sys/dl.h> header file. */
#undef HAVE_SYS_DL_H #undef HAVE_SYS_DL_H
/* Define to 1 if you have the <sys/epoll.h> header file. */
#undef HAVE_SYS_EPOLL_H
/* Define to 1 if you have the <sys/stat.h> header file. */ /* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H #undef HAVE_SYS_STAT_H