Initial release of Maemo 5 port of gnuplot
[gnuplot] / m4 / apple.m4
diff --git a/m4/apple.m4 b/m4/apple.m4
new file mode 100644 (file)
index 0000000..edcbfc7
--- /dev/null
@@ -0,0 +1,27 @@
+## ------------------------------- ##
+## Check for Apple Mac OS X        ##
+## From Leigh Smith                ##
+## ------------------------------- ##
+
+# serial 1
+
+AC_DEFUN([GP_APPLE],
+[AC_MSG_CHECKING(for Apple MacOS X)
+AC_EGREP_CPP(yes,
+[#if defined(__APPLE__) && defined(__MACH__)
+  yes
+#endif
+], 
+   [ AC_MSG_RESULT(yes)
+     AC_CHECK_LIB(aquaterm, aqtInit, 
+     [ LIBS="-laquaterm $LIBS -framework Foundation"
+       CFLAGS="$CFLAGS -ObjC"
+       AC_DEFINE(HAVE_LIBAQUATERM,1,
+                 [Define to 1 if you're using the aquaterm library on Mac OS X])
+     ],[], -lobjc)
+     is_apple=yes
+   ],
+   AC_MSG_RESULT(no)
+   is_apple=no)
+])
+