configure.in
changeset 30 57bf11a5efd7
parent 21 75a95f82bc1f
child 35 d3bc792e136d
--- a/configure.in	Fri May 11 00:35:31 2001 +0000
+++ b/configure.in	Fri May 11 01:13:35 2001 +0000
@@ -403,6 +403,49 @@
     fi
 }
 
+dnl Find the nanox include and library directories
+CheckNANOX()
+{
+	AC_ARG_ENABLE(video-nanox,
+		[  --enable-video-nanox use nanox video driver [default=no]],
+	        , enable_video_nanox=no)
+	AC_ARG_ENABLE(nanox-debug,  
+		[  --enable-nanox-debug print debug messages [default=no]],
+		, enable_nanox_debug=no)
+	AC_ARG_ENABLE(nanox-share-memory,  
+		[  --enable-nanox-share-memory use share memory [default=no]],
+		, enable_nanox_share_memory=no)
+
+	AC_ARG_WITH(nanox_pixel_type, 
+		[  --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
+
+	if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
+		if test x$enable_nanox_debug = xyes; then
+			CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
+		fi
+
+		if test x$enable_nanox_share_memory = xyes; then
+			CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
+		fi
+
+		case "$with_nanox_pixel_type" in
+			 rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
+			0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
+			 888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888"  ;;
+			 565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565"  ;;
+			 555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555"  ;;
+			 332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332"  ;;
+			 pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL"  ;;
+			   *) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
+		esac
+
+		CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
+		SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
+		VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
+		VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
+	fi
+}
+
 dnl Find the X11 include and library directories
 CheckX11()
 {
@@ -1042,6 +1085,7 @@
         CheckESD
         CheckNAS
         CheckX11
+        CheckNANOX
         CheckDGA
         CheckFBCON
         CheckGGI
@@ -1921,6 +1965,7 @@
 src/video/cybergfx/Makefile
 src/video/x11/Makefile
 src/video/dga/Makefile
+src/video/nanox/Makefile
 src/video/fbcon/Makefile
 src/video/ggi/Makefile
 src/video/maccommon/Makefile