]> git.saurik.com Git - wxWidgets.git/commitdiff
Add minimal support for QNX to configure.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 Mar 2010 22:59:56 +0000 (22:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 Mar 2010 22:59:56 +0000 (22:59 +0000)
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

configure
configure.in
docs/doxygen/mainpages/const_cpp.h
setup.h.in

index 5c972b531b5f717ce0d5f37518aa09dbe11a99c0..ee0c8da219fc4a265f833afc11da5651e33357af 100755 (executable)
--- a/configure
+++ b/configure
@@ -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
index 58f3c1bc7415f6fc9325a381f0c3bedea64c6e8b..ae0063162207767a73a328af0d1f5c31c532b43e 100644 (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
index c5c8ecbfc2d5ddd47a84d43f258723cbbcf09149..898de55e1554d3d06c538b274867aa2b7fbc2b57 100644 (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}
index 40a2cb30e2e55ce403a1355392a99659383df323..74d7911cf9916b568802f8c8e14b6ad1553be7ce 100644 (file)
@@ -97,6 +97,7 @@
 #undef __NETBSD__
 #undef __OPENBSD__
 #undef __OSF__
+#undef __QNX__
 #undef __SGI__
 #undef __SOLARIS__
 #undef __SUN__