diff --git a/configure.in b/configure.in index 7a225c361..57bd8197f 100644 --- a/configure.in +++ b/configure.in @@ -46,13 +46,8 @@ case $host_os in if test "x$with_archflags" != x ; then CFLAGS="$CFLAGS $with_archflags" fi - USEMMFILES="Yes" - ;; - *) - USEMMFILES="No" ;; esac -AC_SUBST(USEMMFILES) dnl FLTK library versions... FL_MAJOR_VERSION=1 @@ -73,13 +68,13 @@ AC_SUBST(ARCHFLAGS) AC_SUBST(OPTIM) dnl OS-specific pre-tests... -dnl host_os_gui equals $host_os unless we target Cygwin in combination with X11. +dnl host_os_gui equals $host_os unless we target Cygwin or Darwin in combination with X11. host_os_gui=$host_os case $host_os in cygwin*) # Handle Cygwin option *first*, before all other tests. AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the Cygwin libraries [[default=no]]]) - AC_ARG_ENABLE(x11, [ --enable-x11 use Cygwin with X11 [[default=no]]]) + AC_ARG_ENABLE(x11, [ --enable-x11 use with X11 [[default=no]]]) if test x$enable_cygwin = xyes; then # we target Cygwin in combination with X11 if test x$enable_x11 = xyes; then @@ -87,6 +82,14 @@ case $host_os in fi fi ;; + darwin*) + if test x$enable_x11 = xyes; then + host_os_gui="X11" + OPTIM="-U__APPLE__ $OPTIM" + fi + ;; + *) + ;; esac dnl Define the libraries and link options we will need. @@ -397,12 +400,6 @@ AC_ARG_WITH(archflags, [ --with-archflags="flags" use custom architecture flags (possible Mac OS X values include -arch i386, -arch x86_64, -arch ppc)], ARCHFLAGS="$withval") -case $host_os in - darwin*) -# QD is not supported anymore since 1.3 - AC_DEFINE(__APPLE_QUARTZ__) - ;; -esac dnl Find commands... AC_PROG_INSTALL @@ -832,6 +829,8 @@ AC_ARG_WITH(links, [ --with-links make header links for common missp INSTALL_DESKTOP="" UNINSTALL_DESKTOP="" +USEMMFILES="No" + case $host_os_gui in cygwin* | mingw*) dnl Cygwin environment, using windows GDI ... @@ -878,6 +877,10 @@ case $host_os_gui in ;; darwin*) + AC_DEFINE(__APPLE_QUARTZ__) + + USEMMFILES="Yes" + # MacOS X uses Cocoa for graphics. LIBS="$LIBS -framework Cocoa" @@ -1090,6 +1093,8 @@ AC_SUBST(THREADS) AC_SUBST(INSTALL_DESKTOP) AC_SUBST(UNINSTALL_DESKTOP) +AC_SUBST(USEMMFILES) + dnl Figure out the appropriate formatted man page extension... case "$host_os" in *bsd* | darwin*)