Add minimal support for QNX to configure.

Recognize QNX and define __QNX__ under it.

Don't use -lpthreads as the thread functions are in libc under QNX.

Use wxX11 by default.

See #11790.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-03-12 22:59:56 +00:00
parent 226441f05f
commit 229251afd8
4 changed files with 50 additions and 5 deletions

22
configure vendored
View File

@ -2698,6 +2698,14 @@ _ACEOF
DEFAULT_DEFAULT_wxUSE_MOTIF=1
;;
*-*-qnx*)
USE_QNX=1
cat >>confdefs.h <<\_ACEOF
#define __QNX__ 1
_ACEOF
DEFAULT_DEFAULT_wxUSE_X11=1
;;
*-*-solaris2* )
USE_SUN=1
USE_SOLARIS=1
@ -39480,6 +39488,10 @@ echo "$as_me: WARNING: BeOS threads are not yet supported... disabled" >&2;}
fi
;;
*-*-qnx*)
THREAD_OPTS=""
;;
*-*-*UnixWare*)
if test "x$GCC" != "xyes"; then
THREAD_OPTS="-Ethread"
@ -39487,7 +39499,15 @@ echo "$as_me: WARNING: BeOS threads are not yet supported... disabled" >&2;}
;;
esac
THREAD_OPTS="$THREAD_OPTS pthread none"
case "${host}" in
*-*-qnx*)
THREAD_OPTS="none pthread"
;;
*)
THREAD_OPTS="$THREAD_OPTS pthread none"
;;
esac
THREADS_OK=no
for flag in $THREAD_OPTS; do

View File

@ -184,6 +184,11 @@ case "${host}" in
AC_DEFINE(__SVR4__)
DEFAULT_DEFAULT_wxUSE_MOTIF=1
;;
*-*-qnx*)
USE_QNX=1
AC_DEFINE(__QNX__)
DEFAULT_DEFAULT_wxUSE_X11=1
;;
*-*-solaris2* )
USE_SUN=1
USE_SOLARIS=1
@ -4921,6 +4926,12 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
fi
;;
*-*-qnx*)
dnl under QNX thread functions are in libc so we don't need any
dnl special options to link with them
THREAD_OPTS=""
;;
*-*-*UnixWare*)
dnl flying by man pages here: Caldera online docs use this
if test "x$GCC" != "xyes"; then
@ -4929,10 +4940,22 @@ if test "$TOOLKIT" != "MSW" -a "$USE_OS2" != 1; then
;;
esac
dnl simply linking with libpthread should make the test below work but
dnl it's far from certain that the threaded programs compiled without
dnl any special switches actually work, so try it after all the others
THREAD_OPTS="$THREAD_OPTS pthread none"
case "${host}" in
*-*-qnx*)
dnl -lpthread works, i.e. AC_TRY_LINK() would pass, but results
dnl in warnings and is not needed under QNX so try without it
dnl first
THREAD_OPTS="none pthread"
;;
*)
dnl simply linking with libpthread should make the test below
dnl work but it's far from certain that the threaded programs
dnl compiled without any special switches actually work, so try
dnl it after all the others
THREAD_OPTS="$THREAD_OPTS pthread none"
;;
esac
dnl now test for all possibilities
THREADS_OK=no

View File

@ -103,6 +103,7 @@ symbols, although this has not always been followed.
@itemdef{__LINUX__, Linux}
@itemdef{__MACH__, Mach-O Architecture (Mac OS X only builds)}
@itemdef{__OSF__, OSF/1}
@itemdef{__QNX__, QNX Neutrino RTOS}
@itemdef{__PALMOS__, PalmOS}
@itemdef{__SGI__, IRIX}
@itemdef{__SOLARIS__, Solaris}

View File

@ -97,6 +97,7 @@
#undef __NETBSD__
#undef __OPENBSD__
#undef __OSF__
#undef __QNX__
#undef __SGI__
#undef __SOLARIS__
#undef __SUN__