ports/graphics/libggi/files/patch-configure.in
Pav Lucistnik db68adcd1a - Enable xf86dga
- Get rid of libtool archives
- Bump portrevision

PR:		ports/52380
Submitted by:	Pedro F. Giffuni <giffunip@yahoo.com>
2003-12-09 00:01:39 +00:00

174 lines
5.2 KiB
Text

--- configure.in.orig Sun Aug 17 17:28:49 2003
+++ configure.in Sun Aug 17 17:29:44 2003
@@ -30,6 +30,11 @@
dnl Common useable Targets
build_x_target="auto"
build_xlib_target="no"
+build_x_dbe_target="auto"
+build_x_evi_target="auto"
+build_x_shm_target="auto"
+build_x_xf86dga_target="auto"
+build_x_xf86vmode_target="auto"
build_file_target="auto"
build_kgi_target="no"
build_libkgi_target="no"
@@ -276,6 +281,25 @@
linux/kdev_t.h linux/major.h glide.h glide/glide.h kgimon.h sys/un.h \
sys/socket.h netinet/in.h netdb.h windows.h ddraw.h vgl.h)
+
+dnl ========================================================================
+dnl Check header files dependencies.
+
+dnl Disable targets requiring non-existing headers
+if test "x$ac_cv_header_sys_shm_h" != "xyes"; then
+ build_x_shm_target="no"
+ build_ipc_target="no"
+dnl TODO:
+dnl Disable programs/demos/wrap.c here
+fi
+
+if test "x$ac_cv_header_sys_ipc_h" != "xyes"; then
+ build_ipc_target="no"
+dnl TODO:
+dnl Disable programs/demos/wrap.c here
+fi
+
+
dnl ========================================================================
dnl LibGII must be built
@@ -349,6 +373,11 @@
dnl ========================================================================
+dnl Check function dependencies.
+
+dnl TODO: Disable targets requiring non-existing functions.
+
+dnl ========================================================================
dnl Checks whether to compile in various SWARs
if test "x$do_noswar" = "xyes"; then
@@ -624,15 +653,18 @@
dnl This is necessary as there are plattforms, where
-dnl $ac_x_includes does NOT belong to the default search
+dnl $(ac_)x_includes does NOT belong to the default search
dnl path. Darwin is such a system, for example.
-dnl $ac_x_includes contains the right path to the X
+dnl $(ac_)x_includes contains the right path to the X
dnl includes (/usr/X11R6/include on most systems).
cflags_old="$CFLAGS"
cppflags_old="$CPPFLAGS"
- CFLAGS="$CFLAGS -I$ac_x_includes"
- CPPFLAGS="$CPPFLAGS -I$ac_x_includes"
+ if test -z "$x_includes" -o "x$x_includes" = "xNONE"; then
+ x_includes="$ac_x_includes"
+ fi
+ CFLAGS="$CFLAGS -I$x_includes"
+ CPPFLAGS="$CPPFLAGS -I$x_includes"
AC_CHECK_HEADERS(X11/extensions/xf86dga.h \
X11/extensions/Xdbe.h \
@@ -642,6 +674,22 @@
CFLAGS="$cflags_old"
CPPFLAGS="$cppflags_old"
+ if test "x$ac_cv_header_X11_extensions_Xdbe_h" != "xyes"; then
+ build_x_dbe_target="no"
+ fi
+ if test "x$ac_cv_header_X11_extensions_XEVI_h" != "xyes"; then
+ build_x_evi_target="no"
+ fi
+ if test "x$ac_cv_header_X11_extensions_XShm_h" != "xyes"; then
+ build_x_shm_target="no"
+ fi
+ if test "x$ac_cv_header_X11_extensions_xf86dga_h" != "xyes"; then
+ build_x_xf86dga_target="no"
+ fi
+ if test "x$ac_cv_header_X11_extensions_xf86vmode_h" != "xyes"; then
+ build_x_xf86vmode_target="no"
+ fi
+
x_helper_xf86dga_libs=""
x_helper_xf86vm_libs=""
@@ -649,7 +697,7 @@
x_helper_xf86dga_libs="-lXxf86dga_pic",
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion,
x_helper_xf86dga_libs="-lXxf86dga",
- ac_cv_header_X11_extensions_xf86dga_h=no,
+ build_x_xf86dga_target=no,
[ $X_LIBS -lXext -lX11 $X_EXTRA_LIBS ]),
[ $X_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
@@ -657,7 +705,7 @@
x_helper_xf86vm_libs="-lXxf86vm_pic",
AC_CHECK_LIB(Xxf86vm, XF86VidModeSwitchToMode,
x_helper_xf86vm_libs="-lXxf86vm",
- ac_cv_header_X11_extensions_xf86vmode_h=no,
+ build_x_xf86vmode_target=no,
[ $X_LIBS -lXext -lX11 $X_EXTRA_LIBS ]),
[ $X_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
fi
@@ -699,8 +747,10 @@
if test "x$build_kgi_target" != "xno"; then
AC_TRY_COMPILE([
-#include "kgi/config.h"
-#include <kgi/system.h>
+#ifndef __FreeBSD__
+# include "kgi/config.h"
+# include <kgi/system.h>
+#endif
#include <kgi/kgi.h>
],[
kgi_u32_t i;
@@ -827,7 +877,7 @@
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(if we should build support for DoubleBuffer extension for x target)
- if test "x$ac_cv_header_X11_extensions_Xdbe_h" != "xyes"; then
+ if test "x$build_x_dbe_target" = "xno"; then
AC_MSG_RESULT(no)
else
XSUBDIRS="$XSUBDIRS dbe"
@@ -835,7 +885,7 @@
fi
AC_MSG_CHECKING(if we should build support for Extended Visual Information extension for x target)
- if test "x$ac_cv_header_X11_extensions_XEVI_h" != "xyes"; then
+ if test "x$build_x_evi_target" = "xno"; then
AC_MSG_RESULT(no)
else
XSUBDIRS="$XSUBDIRS evi"
@@ -843,7 +893,7 @@
fi
AC_MSG_CHECKING(if we should build support for MIT-SHM extension for x target)
- if test "x$ac_cv_header_X11_extensions_XShm_h" != "xyes"; then
+ if test "x$build_x_shm_target" = "xno"; then
AC_MSG_RESULT(no)
else
XSUBDIRS="$XSUBDIRS shm"
@@ -851,7 +901,7 @@
fi
AC_MSG_CHECKING(if we should build support for xf86dga extension for x target)
- if test "x$ac_cv_header_X11_extensions_xf86dga_h" != "xyes"; then
+ if test "x$build_x_xf86dga_target" = "xno"; then
AC_MSG_RESULT(no)
else
XSUBDIRS="$XSUBDIRS dga"
@@ -859,7 +909,7 @@
fi
AC_MSG_CHECKING(if we should build support for XF86 Vidmode extension for x target)
- if test "x$ac_cv_header_X11_extensions_xf86vmode_h" != "xyes"; then
+ if test "x$build_x_xf86vmode_target" = "xno"; then
AC_MSG_RESULT(no)
else
XSUBDIRS="$XSUBDIRS vidmode"