Re: [AD] Linux progress

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, Jul 01, 1999 at 11:29:29PM +0100, Shawn Hargreaves wrote:
> I've uploaded a patch to http://www.sunsite.auc.dk/allegro/3920plus1.diff.gz.

Here's a patch agaist that, which adds the configuration options
to configure.in.  The options are:

  --enable-linux-console[=yes]   enable Linux console support [default=yes]
     --enable-fbcon[=yes]           enable fbcon graphics driver [default=yes]
     --enable-vbeaf[=yes]           enable VBE/AF graphics driver [default=yes]
     --enable-ggi[=no]              enable GGI graphics driver [default=no]

This was really easy to add; what was confusing me before was
that the `--with-x' switch never seemed to be checked as far as
I could see, but after reading the documentation for autoconf I
see that it's an automatically supported option.

Should the first `enable' above be `with'?  I don't really know
what the difference is.

As with the other patches, I've hand-edited the changes to
`configure' out -- run `autoconf' before trying to configure.

-- 
George


diff -urN allegro-3.9.20plus1/acconfig.h allegro-3.9.20plus1-1/acconfig.h
--- allegro-3.9.20plus1/acconfig.h	Fri Jun 25 21:00:19 1999
+++ allegro-3.9.20plus1-1/acconfig.h	Fri Jul  2 14:15:34 1999
@@ -19,6 +19,15 @@
 /* Define if target platform is linux.  */
 #undef ALLEGRO_LINUX
 
+/* Define to enable Linux console fbcon driver */
+#undef ALLEGRO_LINUX_FBCON
+
+/* Define to enable Linux console VBE/AF driver */
+#undef ALLEGRO_LINUX_VBEAF
+
+/* Define to enable Linux console GGI driver */
+#undef ALLEGRO_LINUX_GGI
+
 /* Define if target machine is little endian.  */
 #undef ALLEGRO_LITTLE_ENDIAN
 
diff -urN allegro-3.9.20plus1/configure.in allegro-3.9.20plus1-1/configure.in
--- allegro-3.9.20plus1/configure.in	Fri Jul  2 05:03:52 1999
+++ allegro-3.9.20plus1-1/configure.in	Fri Jul  2 14:13:27 1999
@@ -7,6 +7,31 @@
 AC_ARG_PROGRAM
 
 
+dnl Enable Linux console support
+AC_ARG_ENABLE(linux-console,
+[  --enable-linux-console[=yes]   enable Linux console support [default=yes]],
+test "X$enableval" != "Xno" && allegro_support_linux_console=yes,
+allegro_support_linux_console=yes)
+
+dnl Enable Linux console fbcon driver
+AC_ARG_ENABLE(fbcon,
+[     --enable-fbcon[=yes]           enable fbcon graphics driver [default=yes]],
+test "X$enableval" != "Xno" && allegro_enable_fbcon=yes,
+allegro_enable_fbcon=yes)
+
+dnl Enable Linux console VBE/AF driver
+AC_ARG_ENABLE(vbeaf,
+[     --enable-vbeaf[=yes]           enable VBE/AF graphics driver [default=yes]],
+test "X$enableval" != "Xno" && allegro_enable_vbeaf=yes,
+allegro_enable_vbeaf=yes)
+
+dnl Enable Linux console GGI driver
+AC_ARG_ENABLE(ggi,
+[     --enable-ggi[=no]              enable GGI graphics driver [default=no]],
+test "X$enableval" != "Xno" && allegro_enable_ggi=yes,
+allegro_enable_ggi=no)
+
+
 dnl Enable 8-bpp color depth (default).
 AC_ARG_ENABLE(color8,
 [  --enable-color8[=val]   enable support for 8-bpp modes [default=yes]],
@@ -172,8 +197,19 @@
 allegro_system=`uname -s | tr A-Z a-z`
 case "$allegro_system" in
 *linux*)
-  AC_DEFINE(ALLEGRO_LINUX)
-  ALLEGRO_MAYBE_LINUX_FILES=ALLEGRO_SRC_LINUX_FILES
+  if test "$allegro_support_linux_console" = yes; then
+    AC_DEFINE(ALLEGRO_LINUX)
+    ALLEGRO_MAYBE_LINUX_FILES=ALLEGRO_SRC_LINUX_FILES
+    if test "$allegro_enable_fbcon" = yes; then
+      AC_DEFINE(ALLEGRO_LINUX_FBCON)
+    fi
+    if test "$allegro_enable_vbeaf" = yes; then
+      AC_DEFINE(ALLEGRO_LINUX_VBEAF)
+    fi
+    if test "$allegro_enable_ggi" = yes; then
+      AC_DEFINE(ALLEGRO_LINUX_GGI)
+    fi
+  fi
   ;;
 esac
 AC_SUBST(ALLEGRO_MAYBE_LINUX_FILES)
diff -urN allegro-3.9.20plus1/include/allegro/aintunix.h allegro-3.9.20plus1-1/include/allegro/aintunix.h
--- allegro-3.9.20plus1/include/allegro/aintunix.h	Tue Jun 29 12:50:36 1999
+++ allegro-3.9.20plus1-1/include/allegro/aintunix.h	Fri Jul  2 13:43:23 1999
@@ -54,7 +54,7 @@
    AL_ARRAY(_DRIVER_INFO, _xwindows_timer_driver_list);
 #endif
 
-#ifdef ALLEGRO_LINUX_CONSOLE
+#ifdef ALLEGRO_LINUX
    #include "aintlnx.h"
 #endif
 
diff -urN allegro-3.9.20plus1/include/allegro/alucfg.h allegro-3.9.20plus1-1/include/allegro/alucfg.h
--- allegro-3.9.20plus1/include/allegro/alucfg.h	Fri Jul  2 05:03:52 1999
+++ allegro-3.9.20plus1-1/include/allegro/alucfg.h	Fri Jul  2 14:13:51 1999
@@ -79,15 +79,5 @@
 #define ALLEGRO_NO_FINDFIRST
 #endif
 
-#ifdef __linux__
-/* todo: this stuff really ought to come out of the configure script, if
- * only I knew how to do that :-)
- */
-#define ALLEGRO_LINUX_CONSOLE
-#define ALLEGRO_LINUX_FBCON
-#define ALLEGRO_LINUX_VBEAF
-// #define ALLEGRO_LINUX_GGI
-#endif
-
 #endif /* ifndef ALUCFG_H */
 
diff -urN allegro-3.9.20plus1/include/allegro/alunix.h allegro-3.9.20plus1-1/include/allegro/alunix.h
--- allegro-3.9.20plus1/include/allegro/alunix.h	Fri Jul  2 05:03:52 1999
+++ allegro-3.9.20plus1-1/include/allegro/alunix.h	Fri Jul  2 13:43:06 1999
@@ -73,7 +73,7 @@
 /************ Linux-specific ************/
 /****************************************/
 
-#ifdef ALLEGRO_LINUX_CONSOLE
+#ifdef ALLEGRO_LINUX
 
 
 #define SYSTEM_LINUX             AL_ID('L','N','X','C')
@@ -154,7 +154,7 @@
 }
 
 
-#endif /* ALLEGRO_LINUX_CONSOLE */
+#endif /* ALLEGRO_LINUX */
 
 
 
diff -urN allegro-3.9.20plus1/include/allegro/alunixac.hin allegro-3.9.20plus1-1/include/allegro/alunixac.hin
--- allegro-3.9.20plus1/include/allegro/alunixac.hin	Tue Jun 29 12:50:36 1999
+++ allegro-3.9.20plus1-1/include/allegro/alunixac.hin	Fri Jul  2 14:17:34 1999
@@ -55,6 +55,15 @@
 /* Define if target platform is linux.  */
 #undef ALLEGRO_LINUX
 
+/* Define to enable Linux console fbcon driver */
+#undef ALLEGRO_LINUX_FBCON
+
+/* Define to enable Linux console VBE/AF driver */
+#undef ALLEGRO_LINUX_VBEAF
+
+/* Define to enable Linux console GGI driver */
+#undef ALLEGRO_LINUX_GGI
+
 /* Define if target machine is little endian.  */
 #undef ALLEGRO_LITTLE_ENDIAN
 
diff -urN allegro-3.9.20plus1/src/unix/usystem.c allegro-3.9.20plus1-1/src/unix/usystem.c
--- allegro-3.9.20plus1/src/unix/usystem.c	Tue Jun 29 12:50:37 1999
+++ allegro-3.9.20plus1-1/src/unix/usystem.c	Fri Jul  2 13:43:57 1999
@@ -27,7 +27,7 @@
 #ifdef ALLEGRO_WITH_XWINDOWS
    {  SYSTEM_XWINDOWS,  &system_xwindows,  TRUE  },
 #endif
-#ifdef ALLEGRO_LINUX_CONSOLE
+#ifdef ALLEGRO_LINUX
    {  SYSTEM_LINUX,     &system_linux,     TRUE  },
 #endif
    {  SYSTEM_NONE,      &system_none,      TRUE  },



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/