home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / widgets / configure.in < prev    next >
Text File  |  1996-05-27  |  4KB  |  115 lines

  1. # configure.in --- Mesa GL Widget for X11 Toolkit Programming
  2. # Copyright (C) 1995 by
  3. #   Jeroen van der Zijp <jvz@cyberia.cfdrc.com>
  4. #   Thorsten Ohl <Thorsten.Ohl@Physik.TH-Darmstadt.de>
  5. #
  6. # This library is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU Library General Public
  8. # License as published by the Free Software Foundation; either
  9. # version 2 of the License, or (at your option) any later version.
  10. #
  11. # This library is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU Library General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Library General Public
  17. # License along with this library; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. #
  20. # $Id: configure.in,v 1.12 1995/06/08 09:51:06 ohl Exp $
  21. #
  22. ########################################################################
  23. AC_INIT([src/GLwDrawingArea.c])dnl
  24. AC_CANONICAL_HOST
  25. AC_PROG_INSTALL
  26. AC_PROG_LN_S
  27. AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man])dnl
  28. AC_CHECK_PROG([POD2HTML], [pod2html], [pod2html])dnl
  29. AC_PROG_RANLIB
  30. ARFLAGS="ruv"
  31. AC_SUBST([ARFLAGS])dnl
  32. AC_SUBST([SYS_CFLAGS])dnl
  33. AC_SUBST([SYS_LDFLAGS])dnl
  34. AC_PROG_CC
  35. test "$CC" = "gcc" && SYS_CFLAGS="$SYS_CFLAGS -pipe -Wall"
  36. AC_PROG_CPP
  37. # Query Brian Paul's database for compiling Mesa:
  38. case "$host" in
  39.   *-hp-hpux*)
  40.     SYS_CFLAGS="$SYS_CFLAGS -D_HPUX_SOURCE"
  41.     test "$CC" = "gcc" || SYS_CFLAGS="$SYS_CFLAGS +O2 +Oall +Onolimit -Aa"
  42.     ;;
  43.   mips-sgi-irix4*)
  44.     test "$CC" = "gcc" || SYS_CFLAGS="$SYS_CFLAGS -float"
  45.     ARFLAGS="rcv"
  46.     ;;
  47.   mips-sgi-irix5*)
  48.     # On IRIX 5.3 -sopt causes a problem in drawpixels.c so we don't use it
  49.     test "$CC" = "gcc" || \
  50.       SYS_CFLAGS="$SYS_CFLAGS -ansi -prototypes -fullwarn -float"
  51.     ARFLAGS="rcv"
  52.     ;;
  53.   mips-sgi-irix6*)
  54.     #   1068 - integer conversion resulted in a change of sign
  55.     #   1069 - integer conversion resulted in truncation
  56.     #   1174 - variable was declared but never referenced
  57.     #   1185 - enumerated type mixed with another type
  58.     #   1209 - controlling expression is constant
  59.     #   1474 - declaring a void parameter list with a typedef is nonstandard
  60.     #   1552 - variable was set but never used
  61.     test "$CC" = "gcc" || \
  62.       SYS_CFLAGS="$SYS_CFLAGS -64 -ansi -prototypes -fullwarn \
  63.                   -woff 1068,1069,1174,1185,1209,1474,1552"
  64.     ARFLAGS="rcv"
  65.     ;;
  66.   *-linux*)
  67.     SYS_CFLAGS="$SYS_CFLAGS -mieee-fp -DSHM"
  68.     SYS_LDFLAGS="$SYS_LDFLAGS -mieee-fp"
  69.     ;;
  70.   *-netbsd*)
  71.     ARFLAGS="rcv"
  72.     ;;
  73.   alpha-dec-osf*)
  74.     test "$CC" = "gcc" || SYS_CFLAGS="$SYS_CFLAGS -std1 -DSHM"
  75.     ;;
  76.   sparc-sun-solaris2*)
  77.     test "$CC" = "gcc" || SYS_CFLAGS="$SYS_CFLAGS -Xa"
  78.     ;;
  79.   *-ultrix*)
  80.     test "$CC" = "gcc" || SYS_CFLAGS="$SYS_CFLAGS -Dconst=/**/"
  81.     ARFLAGS="rusv"
  82.     ;;
  83. esac
  84. AC_PATH_XTRA
  85. AC_HEADER_STDC
  86. AC_C_CONST
  87. AC_C_INLINE
  88. AC_CHECK_FUNCS(strchr memcpy memmove)dnl
  89. AC_ARG_ENABLE(debug,
  90.   [  --enable-debug          also compile debugging code],
  91.   [case x$withval in
  92.     xno) ;;
  93.     x*)  AC_DEFINE([DEBUG]);;
  94.    esac])dnl
  95. AC_ARG_WITH(motif,
  96.   [  --with-motif            also compile the Motif widgets (untested)],
  97.   [case x$withval in
  98.     xno) MOTIFOBJ="";;
  99.     x*)  AC_CHECK_HEADER([Xm/Xm.h],
  100.            [MOTIFOBJ="GLwMDrawingArea.o GLwCreateMDrawingArea.o"]);;
  101.    esac],
  102.   [MOTIFOBJ=""])dnl
  103. AC_SUBST([MOTIFOBJ])dnl
  104. AC_ARG_WITH(mesadir,
  105.   [  --with-mesadir=PATH     use the Mesa tree rooted in PATH (default: ..)],
  106.   [case x$withval in
  107.     xno) mesa_srcdir="`pwd`";;
  108.     x)   mesa_srcdir="`cd .. && pwd`";;
  109.     x*)  mesa_srcdir="`cd $withval && pwd`";;
  110.    esac],
  111.   [mesa_srcdir="`cd .. && pwd`"])dnl
  112. AC_SUBST([mesa_srcdir])dnl
  113. AC_OUTPUT([Makefile src/Makefile include/GL/Makefile
  114.            demos/Makefile man/Makefile])dnl
  115.