diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2009-02-14 14:34:32 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2009-02-14 14:34:32 +0000 |
| commit | c0717aa18e7da3768c920569c980e04a577cba11 (patch) | |
| tree | 7aebdf046ccec77e3e1bd644b950e7dcb64abf19 /configure.in | |
| parent | 4ac63b788ac61296a12b0694ded763244023ff53 (diff) | |
STR 2147: new configure option --enable-x11 for building on cygwin with X11
support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6657 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/configure.in b/configure.in index 61f08594c..c3360aeff 100644 --- a/configure.in +++ b/configure.in @@ -68,10 +68,14 @@ AC_SUBST(ARCHFLAGS) AC_SUBST(OPTIM) dnl OS-specific pre-tests... +dnl uname_GUI equals $uname unless we target cygwin +dnl in combination with X11. +uname_GUI=$uname case $uname in CYGWIN* | MINGW*) # Handle Cygwin option *first*, before all other tests. - AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the CygWin libraries [default=no]]) + AC_ARG_ENABLE(cygwin, [ --enable-cygwin use the CygWin libraries [(default=no)]]) + AC_ARG_ENABLE(x11, [ --enable-x11 use CygWin with X11 [(default=no)]]) if test x$enable_cygwin != xyes; then # NOTE: We can't use ARCHFLAGS for this, since it does not work # with some of the function tests - Cygwin uses a @@ -81,6 +85,11 @@ case $uname in CXXFLAGS="$CXXFLAGS -mno-cygwin" LDFLAGS="$LDFLAGS -mno-cygwin" DSOFLAGS="$DSOFLAGS -mno-cygwin" + else + # we target cygwin in combination with X11 + if test x$enable_x11 == xyes; then + uname_GUI="X11$uname" + fi fi ;; esac @@ -267,11 +276,19 @@ if test x$enable_shared = xyes; then IMGDSONAME="mgwfltknox_images-$FL_API_VERSION.dll" CAIRODSONAME="mgwfltknox_cairo-$FL_API_VERSION.dll" else - DSONAME="cygfltknox-$FL_API_VERSION.dll" - FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll" - GLDSONAME="cygfltknox_gl-$FL_API_VERSION.dll" - IMGDSONAME="cygfltknox_images-$FL_API_VERSION.dll" - CAIRODSONAME="cygfltknox_cairo-$FL_API_VERSION.dll" + if test x$enable_x11 == xyes; then + DSONAME="cygfltk-$FL_API_VERSION.dll" + FLDSONAME="cygfltk_forms-$FL_API_VERSION.dll" + GLDSONAME="cygfltk_gl-$FL_API_VERSION.dll" + IMGDSONAME="cygfltk_images-$FL_API_VERSION.dll" + CAIRODSONAME="cygfltk_cairo-$FL_API_VERSION.dll" + else + DSONAME="cygfltknox-$FL_API_VERSION.dll" + FLDSONAME="cygfltknox_forms-$FL_API_VERSION.dll" + GLDSONAME="cygfltknox_gl-$FL_API_VERSION.dll" + IMGDSONAME="cygfltknox_images-$FL_API_VERSION.dll" + CAIRODSONAME="cygfltknox_cairo-$FL_API_VERSION.dll" + fi fi #----------------------------------------------------------- # -Wl,--enable-runtime-pseudo-reloc: See str 1585 @@ -730,15 +747,15 @@ AC_ARG_WITH(links, [ --with-links make header links for common missp INSTALL_DESKTOP="" UNINSTALL_DESKTOP="" -case $uname in +case $uname_GUI in CYGWIN* | MINGW*) - dnl Cygwin environment... + dnl Cygwin environment, using windows GDI ... # Recent versions of Cygwin are seriously broken and the size # checks don't work because the shell puts out \r\n instead of # \n. Here we just force U32 to be defined to "unsigned"... AC_DEFINE(U32,unsigned) - CFLAGS="-mwindows -DWIN32 $CFLAGS" - CXXFLAGS="-mwindows -DWIN32 $CXXFLAGS" + CFLAGS="-mwindows -DWIN32 -DUSE_OPENGL32 $CFLAGS" + CXXFLAGS="-mwindows -DWIN32 -DUSE_OPENGL32 $CXXFLAGS" LDFLAGS="-mwindows $LDFLAGS" DSOFLAGS="-mwindows $DSOFLAGS" LIBS="$LIBS -lole32 -luuid -lcomctl32" @@ -766,7 +783,7 @@ case $uname in AC_DEFINE(HAVE_PTHREAD) fi - THREADS="threads.exe" + THREADS="threads$EXEEXT" fi # Don't make symlinks since Windows is not case sensitive. @@ -781,7 +798,7 @@ case $uname in if test x$have_pthread = xyes; then AC_DEFINE(HAVE_PTHREAD) - THREADS="threads" + THREADS="threads$EXEEXT" fi if test x$enable_gl != xno; then @@ -810,9 +827,10 @@ case $uname in *) # All others are UNIX/X11... + # This includes cygwin target combined with X11 if test x$have_pthread = xyes; then AC_DEFINE(HAVE_PTHREAD) - THREADS="threads" + THREADS="threads$EXEEXT" fi dnl Check for X11... @@ -891,9 +909,10 @@ case $uname in CPPFLAGS="`$FTCONFIG --cflags` $CPPFLAGS" CXXFLAGS="`$FTCONFIG --cflags` $CXXFLAGS" + AC_CHECK_LIB(fontconfig, FcPatternCreate) AC_CHECK_HEADER(X11/Xft/Xft.h, AC_CHECK_LIB(Xft, XftDrawCreate, - AC_DEFINE(USE_XFT) + AC_DEFINE(USE_XFT) LIBS="-lXft $LIBS")) fi fi @@ -1199,7 +1218,7 @@ echo "" echo "Configuration Summary" echo "-------------------------------------------------------------------------" -case $uname in +case $uname_GUI in CYGWIN* | MINGW*) graphics="GDI" ;; |
