paragui-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-cvs] CVS: paragui paragui2-config.in,NONE,1.1.2.1 paragui2.m4,N


From: Teunis Peters <address@hidden>
Subject: [paragui-cvs] CVS: paragui paragui2-config.in,NONE,1.1.2.1 paragui2.m4,NONE,1.2.2.1 paragui2.pc.in,NONE,1.1.2.1 paragui2.spec.in,NONE,1.1.2.1 TODO,1.1.1.1.2.2,1.1.1.1.2.3 configure.in,1.8.2.1,1.8.2.2 paragui.m4,1.1.1.1,1.1.1.1.2.1
Date: Tue, 25 Jun 2002 23:25:06 -0400

Update of /cvsroot/paragui/paragui
In directory subversions:/tmp/cvs-serv31265

Modified Files:
      Tag: devel-opengl
        TODO configure.in paragui.m4 
Added Files:
      Tag: devel-opengl
        paragui2-config.in paragui2.m4 paragui2.pc.in paragui2.spec.in 
Log Message:
Added in patches from paragui-main
removed glSDL dependency
started preparing OpenGL drawable classes
As of this point most demos are working fine :)


--- NEW FILE ---
#!/bin/sh

address@hidden@
address@hidden@
exec_prefix_set=no

usage="\
Usage: paragui2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] 
[--libs] [--cflags]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo @PARAGUI_VERSION@
      ;;
    --cflags)
      if test @includedir@ != /usr/include ; then
        address@hidden@
      fi
      echo $includes address@hidden@/paragui @PARAGUI_CFLAGS@
      ;;
    --libs)
      if [ "`uname`" = "SunOS" ]; then
        libdirs="address@hidden@ address@hidden@"
      else
        libdirs="address@hidden@"
      fi
      echo $libdirs @PARAGUI_LIBS@
      ;;
    --static-libs)
      if [ "`uname`" = "SunOS" ]; then
        libdirs="address@hidden@ address@hidden@"
      else
        libdirs="address@hidden@"
      fi
      echo $libdirs @PARAGUI_LIBS@ @SYSTEM_LIBS@
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done

--- NEW FILE ---
# Configure paths for ParaGUI
# Alexander Pipelka 17.05.2000
# stolen from Sam Lantinga 
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor

dnl AM_PATH_PARAGUI2([MINIMUM-VERSION, [ACTION-IF-FOUND [, 
ACTION-IF-NOT-FOUND]]])
dnl Test for PARAGUI, and define PARAGUI_CFLAGS and PARAGUI_LIBS
dnl
AC_DEFUN(AM_PATH_PARAGUI2,
[dnl 
dnl Get the cflags and libraries from the paragui-config2 script
dnl
AC_ARG_WITH(paragui-prefix,[  --with-paragui-prefix=PFX   Prefix where PARAGUI 
is installed (optional)],
            paragui_prefix="$withval", paragui_prefix="")
AC_ARG_WITH(paragui-exec-prefix,[  --with-paragui-exec-prefix=PFX Exec prefix 
where PARAGUI is installed (optional)],
            paragui_exec_prefix="$withval", paragui_exec_prefix="")
AC_ARG_ENABLE(paraguitest, [  --disable-paraguitest       Do not try to compile 
and run a test PARAGUI program],
                    , enable_paraguitest=yes)

  if test x$paragui_exec_prefix != x ; then
     paragui_args="$paragui_args --exec-prefix=$paragui_exec_prefix"
     if test x${PARAGUI_CONFIG+set} != xset ; then
        PARAGUI_CONFIG=$paragui_exec_prefix/bin/paragui-config2
     fi
  fi
  if test x$paragui_prefix != x ; then
     paragui_args="$paragui_args --prefix=$paragui_prefix"
     if test x${PARAGUI_CONFIG+set} != xset ; then
        PARAGUI_CONFIG=$paragui_prefix/bin/paragui-config2
     fi
  fi

  AC_PATH_PROG(PARAGUI_CONFIG, paragui-config2, no)
  min_paragui_version=ifelse([$1], ,0.11.0,$1)
  AC_MSG_CHECKING(for PARAGUI - version >= $min_paragui_version)
  no_paragui=""
  if test "$PARAGUI_CONFIG" = "no" ; then
    no_paragui=yes
  else
    PARAGUI_CFLAGS=`$PARAGUI_CONFIG $paraguiconf_args --cflags`
    PARAGUI_LIBS=`$PARAGUI_CONFIG $paraguiconf_args --libs`

    paragui_major_version=`$PARAGUI_CONFIG $paragui_args --version | \
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
    paragui_minor_version=`$PARAGUI_CONFIG $paragui_args --version | \
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
    paragui_micro_version=`$PARAGUI_CONFIG $paragui_config_args --version | \
           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
    if test "x$enable_paraguitest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CXXFLAGS="$CFLAGS $PARAGUI_CFLAGS"
      LIBS="$LIBS $PARAGUI_LIBS"
dnl
dnl Now check if the installed PARAGUI is sufficiently new. (Also sanity
dnl checks the results of paragui-config2 to some extent
dnl
      rm -f conf.paraguitest
      AC_LANG_CPLUSPLUS
      AC_TRY_RUN([
#include "paragui.h"
#include "pgapplication.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char*
my_strdup (char *str)
{
  char *new_str;
  
  if (str)
    {
      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
      strcpy (new_str, str);
    }
  else
    new_str = NULL;
  
  return new_str;
}

int main (int argc, char *argv[])
{
  int major, minor, micro;
  char *tmp_version;

  PG_Application app;
  
  /* This hangs on some systems (?)
  system ("touch conf.paraguitest");
  */
  { FILE *fp = fopen("conf.paraguitest", "a"); if ( fp ) fclose(fp); }

  /* HP/UX 9 (address@hidden) writes to sscanf strings */
  tmp_version = my_strdup("$min_paragui_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_paragui_version");
     exit(1);
   }

   if (($paragui_major_version > major) ||
      (($paragui_major_version == major) && ($paragui_minor_version > minor)) ||
      (($paragui_major_version == major) && ($paragui_minor_version == minor) 
&& ($paragui_micro_version >= micro)))
    {
      return 0;
    }
  else
    {
      printf("\n*** 'paragui-config2 --version' returned %d.%d.%d, but the 
minimum version\n", $paragui_major_version, $paragui_minor_version, 
$paragui_micro_version);
      printf("*** of PARAGUI required is %d.%d.%d. If paragui-config2 is 
correct, then it is\n", major, minor, micro);
      printf("*** best to upgrade to the required version.\n");
      printf("*** If paragui-config2 was wrong, set the environment variable 
PARAGUI_CONFIG\n");
      printf("*** to point to the correct copy of paragui-config2, and remove 
the file\n");
      printf("*** config.cache before re-running configure\n");
      return 1;
    }
}

],, no_paragui=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_paragui" = x ; then
     AC_MSG_RESULT(yes)
     ifelse([$2], , :, [$2])     
  else
     AC_MSG_RESULT(no)
     if test "$PARAGUI_CONFIG" = "no" ; then
       echo "*** The paragui-config2 script installed by PARAGUI could not be 
found"
       echo "*** If PARAGUI was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the PARAGUI_CONFIG environment variable to 
the"
       echo "*** full path to paragui-config2."
     else
       if test -f conf.paraguitest ; then
        :
       else
          echo "*** Could not run PARAGUI test program, checking why..."
          CFLAGS="$CFLAGS $PARAGUI_CFLAGS"
          LIBS="$LIBS $PARAGUI_LIBS"
          AC_TRY_LINK([
#include "paragui.h"
#include <stdio.h>
],      [ return 0; ],
        [ echo "*** The test program compiled, but did not run. This usually 
means"
          echo "*** that the run-time linker is not finding PARAGUI or finding 
the wrong"
          echo "*** version of PARAGUI. If it is not finding PARAGUI, you'll 
need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit 
/etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run 
ldconfig if that"
          echo "*** is required on your system"
          echo "***"
          echo "*** If you have an old version installed, it is best to remove 
it, although"
          echo "*** you may also be able to get things to work by modifying 
LD_LIBRARY_PATH"],
        [ echo "*** The test program failed to compile or link. See the file 
config.log for the"
          echo "*** exact error that occured. This usually means PARAGUI was 
incorrectly installed"
          echo "*** or that you have moved PARAGUI since it was installed. In 
the latter case, you"
          echo "*** may want to edit the paragui-config2 script: 
$PARAGUI_CONFIG" ])
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     PARAGUI_CFLAGS=""
     PARAGUI_LIBS=""
     ifelse([$3], , :, [$3])
  fi
  AC_SUBST(PARAGUI_CFLAGS)
  AC_SUBST(PARAGUI_LIBS)
  rm -f conf.paraguitest
])

--- NEW FILE ---
address@hidden@
address@hidden@
address@hidden@
address@hidden@

Name: ParaGUI
Description: cross-platform widget library
Version: @VERSION@
Libs: @PARAGUI_LIBS@
Cflags: @PARAGUI_CFLAGS@

--- NEW FILE ---
%define name @PACKAGE@
%define version @VERSION@
%define release 1

Summary: ParaGUI - A complete GUI/Windowing system for SDL
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
URL: http://www.bms-austria.com/projects/paragui
Copyright: LGPL
Group: System Environment/Libraries
BuildRoot: /var/tmp/%{name}-buildroot
Prefix: %{_prefix}
Packager: Alexander Pipelka <address@hidden>

%description
This library is a complete GUI/Windowing system for SDL

%package devel
Summary: Libraries, includes and more to develop SDL GUI applications.
Group: Development/Libraries
Requires: %{name}

%description devel
This library is a complete GUI/Windowing system for SDL

%prep
rm -rf ${RPM_BUILD_ROOT}

%setup

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-opengl
make

%install
rm -rf $RPM_BUILD_ROOT
make install prefix=$RPM_BUILD_ROOT/%{prefix}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc README-ParaGUI.txt COPYING INSTALL
%{prefix}/lib/lib*.so.*
%{prefix}/share/paragui

%files devel
%defattr(-,root,root)
%{prefix}/bin/*-config
%{prefix}/lib/lib*.a
%{prefix}/lib/lib*.so
%{prefix}/include
%{prefix}/share/aclocal/*

%changelog

Index: TODO
===================================================================
RCS file: /cvsroot/paragui/paragui/TODO,v
retrieving revision 1.1.1.1.2.2
retrieving revision 1.1.1.1.2.3
diff -C2 -r1.1.1.1.2.2 -r1.1.1.1.2.3
*** TODO        20 Jun 2002 07:05:57 -0000      1.1.1.1.2.2
--- TODO        26 Jun 2002 03:25:03 -0000      1.1.1.1.2.3
***************
*** 20,23 ****
--- 20,24 ----
                        windowtest - depth != 0 in SDL_CreateRGBSurface DONE
                        paratest - crashes on startup.
+                                - crashes on finish in framebuffer mode
                        dblbuffer
                           (no display, no mouse cursor; note that SDL_Flip() 
sorta works)
***************
*** 27,30 ****
--- 28,32 ----
               most widgets aren't displayed.
               remove glSDL and make work directly with OpenGL
+              make sure to use SDL's OpenGL detect + working :)
  
  ROADMAP:

Index: configure.in
===================================================================
RCS file: /cvsroot/paragui/paragui/configure.in,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -C2 -r1.8.2.1 -r1.8.2.2
*** configure.in        18 Jun 2002 22:40:38 -0000      1.8.2.1
--- configure.in        26 Jun 2002 03:25:03 -0000      1.8.2.2
***************
*** 51,55 ****
  
  dnl Setup for automake
! AM_INIT_AUTOMAKE(paragui, $PARAGUI_VERSION)
  
  dnl Check for tools
--- 51,55 ----
  
  dnl Setup for automake
! AM_INIT_AUTOMAKE(paragui2, $PARAGUI_VERSION)
  
  dnl Check for tools
***************
*** 418,451 ****
  
  AC_ARG_WITH(themedir,[  --with-themedir=DIR     ParaGUI theme files are in 
DIR],
!             PARAGUI_THEMEDIR="$withval", 
PARAGUI_THEMEDIR=$prefix/share/paragui)
  
! if test "$PARAGUI_THEMEDIR" = "NONE/share/paragui"; then
!       PARAGUI_THEMEDIR=$SDL_PREFIX/share/paragui
  fi
  AC_DEFINE_UNQUOTED(PARAGUI_THEMEDIR, "$PARAGUI_THEMEDIR")
  
! dnl Check to see if OpenGL support is desired
! AC_ARG_ENABLE(opengl,[  --enable-opengl   include OpenGL support 
[default=yes]],
!               , enable_opengl=yes)
! if test x$enable_opengl = xyes; then
!    AC_MSG_CHECKING(for OpenGL (GLX) support)
!    vidopengl=no
!    AC_TRY_COMPILE([
!     #include <GL/gl.h>
!     #include <GL/glx.h>
!     #include <dlfcn.h> /* For loading extensions */
!    ],[
!    ],[
!    vidopengl=yes
!    ])
!    AC_MSG_RESULT($vidopengl)
!    if test x$vidopengl = xyes; then
!        CFLAGS="$CFLAGS -DHAVE_OPENGL"
!        SDL_CFLAGS="$SDL_CFLAGS -DHAVE_OPENGL"
!        if test x$use_dlopen != xyes; then
!           AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
!        fi
!    fi
  fi
  
  dnl Check for SDL_image
--- 418,484 ----
  
  AC_ARG_WITH(themedir,[  --with-themedir=DIR     ParaGUI theme files are in 
DIR],
!             PARAGUI_THEMEDIR="$withval", 
PARAGUI_THEMEDIR=$prefix/share/paragui2)
  
! if test "$PARAGUI_THEMEDIR" = "NONE/share/paragui2"; then
!       PARAGUI_THEMEDIR=$SDL_PREFIX/share/paragui2
  fi
  AC_DEFINE_UNQUOTED(PARAGUI_THEMEDIR, "$PARAGUI_THEMEDIR")
  
! dnl Figure out which math library to use
! case "$target" in
!     *-*-cygwin* | *-*-mingw32*)
!         MATHLIB=""
!         SYS_GL_LIBS="-lopengl32"
!         ;;
!     *-*-beos*)
!         MATHLIB=""
!         SYS_GL_LIBS="-lGL"
!         ;;
!     *-*-darwin*)
!         MATHLIB=""
!         SYS_GL_LIBS=""
!         ;;
!     *-*-aix*)
!         if test x$ac_cv_prog_gcc = xyes; then
!             CFLAGS="-mthreads"
!       fi
!         SYS_GL_LIBS=""
!         ;;
!     *)
!         MATHLIB="-lm"
!         AC_PATH_X
!         AC_PATH_XTRA
!         if test x$have_x = xyes; then
!             CFLAGS="$CFLAGS $X_CFLAGS"
!             SYS_GL_LIBS="$X_LIBS -lGL"
!         else
!             SYS_GL_LIBS="-lGL"
!         fi
!         ;;
! esac
! AC_SUBST(MATHLIB)
! 
! dnl Check for OpenGL
! dnl this has problems - FIXME it shouldn't require "SDL/SDL_opengl.h"
! dnl anyone?
! AC_MSG_CHECKING(for OpenGL support)
! have_opengl=no
! saved_CFLAGS="$CFLAGS"
! CFLAGS="$CFLAGS $SDL_CFLAGS"
! AC_TRY_COMPILE([
!  #include "SDL/SDL_opengl.h"
! ],[
! ],[
! have_opengl=yes
! ])
! CFLAGS="$saved_CFLAGS"
! AC_MSG_RESULT($have_opengl)
! if test x$have_opengl = xyes; then
!     CFLAGS="$CFLAGS -DHAVE_OPENGL"
!     GL_LIBS="$SYS_GL_LIBS"
! else
!     GL_LIBS=""
  fi
+ AC_SUBST(GL_LIBS)
  
  dnl Check for SDL_image
***************
*** 512,516 ****
  
  PARAGUI_CFLAGS="$STL_CFLAGS $SIGC_CFLAGS $FREETYPE_CFLAGS $SDL_CFLAGS 
$RTTI_FLAGS $EXTRA_FLAGS"
! PARAGUI_LIBS="-lparagui $SIGC_LIBS $SDL_LIBS -lz $IMAGE_LIBS $LIBEXPAT 
$FREETYPE_LIBS $EXTRA_LIBS $LIBSTDCPP"
  
  CXXFLAGS="$STLPORT_FLAGS $CFLAGS $IMAGE_INCLUDE $RTTI_FLAGS $EXCEPTIONS_FLAGS 
-I$prefix/include"
--- 545,549 ----
  
  PARAGUI_CFLAGS="$STL_CFLAGS $SIGC_CFLAGS $FREETYPE_CFLAGS $SDL_CFLAGS 
$RTTI_FLAGS $EXTRA_FLAGS"
! PARAGUI_LIBS="-lparagui2 $SIGC_LIBS $SDL_LIBS -lz $IMAGE_LIBS $LIBEXPAT 
$FREETYPE_LIBS $EXTRA_LIBS $LIBSTDCPP"
  
  CXXFLAGS="$STLPORT_FLAGS $CFLAGS $IMAGE_INCLUDE $RTTI_FLAGS $EXCEPTIONS_FLAGS 
-I$prefix/include"
***************
*** 549,554 ****
  data/Makefile
  test/Makefile
! paragui.spec
! paragui-config
! paragui.pc
  ], [chmod +x paragui-config])
--- 582,587 ----
  data/Makefile
  test/Makefile
! paragui2.spec
! paragui2-config
! paragui2.pc
  ], [chmod +x paragui-config])

Index: paragui.m4
===================================================================
RCS file: /cvsroot/paragui/paragui/paragui.m4,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -C2 -r1.1.1.1 -r1.1.1.1.2.1
*** paragui.m4  15 Apr 2002 13:22:10 -0000      1.1.1.1
--- paragui.m4  26 Jun 2002 03:25:03 -0000      1.1.1.1.2.1
***************
*** 7,11 ****
  # Shamelessly stolen from Owen Taylor
  
! dnl AM_PATH_PARAGUI([MINIMUM-VERSION, [ACTION-IF-FOUND [, 
ACTION-IF-NOT-FOUND]]])
  dnl Test for PARAGUI, and define PARAGUI_CFLAGS and PARAGUI_LIBS
  dnl
--- 7,11 ----
  # Shamelessly stolen from Owen Taylor
  
! dnl AM_PATH_PARAGUI2([MINIMUM-VERSION, [ACTION-IF-FOUND [, 
ACTION-IF-NOT-FOUND]]])
  dnl Test for PARAGUI, and define PARAGUI_CFLAGS and PARAGUI_LIBS
  dnl
***************
*** 89,93 ****
    char *tmp_version;
  
!   PG_Application app;
    
    /* This hangs on some systems (?)
--- 89,93 ----
    char *tmp_version;
  
!   PG_Application& app = PG_Application::GetInstance();
    
    /* This hangs on some systems (?)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]