Modernized configure.ac a bit and added a rule to Makefile.am to

update libtool. Note that all gcc compiler warnings are now on by
default.


git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@538 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
spanne 2005-01-01 16:39:40 +00:00
parent a38edbb898
commit 90652ea32b
3 changed files with 59 additions and 55 deletions

View File

@ -724,3 +724,7 @@ distribution.
"configure.ac". "configure.ac".
(192) Make "gcc -Wall -pedantic -Werror" happy. (192) Make "gcc -Wall -pedantic -Werror" happy.
(193) Modernized configure.ac a bit and added a rule to Makefile.am to
update libtool. Note that all gcc compiler warnings are now on by
default.

View File

@ -1,4 +1,4 @@
## Process this file with automake to produce makefile.im ## Process this file with automake to produce Makefile.in
SUBDIRS = src include progs doc SUBDIRS = src include progs doc
AUTOMAKE_OPTIONS = gnu AUTOMAKE_OPTIONS = gnu
@ -11,3 +11,5 @@ EXTRA_DIST = \
freeglut_static.dsp \ freeglut_static.dsp \
freeglut_evc4.vcp freeglut_evc4.vcw freeglut_evc4.vcp freeglut_evc4.vcw
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck

View File

@ -1,74 +1,72 @@
dnl Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)
AM_INIT_AUTOMAKE(freeglut,2.2.0) AC_INIT([freeglut library], [2.2.0], [freeglut-bugs@lists.sourceforge.net], [freeglut])
AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([AUTHORS])
AC_CONFIG_HEADERS([config.h])
dnl Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_C_CONST AC_C_CONST
AC_EXEEXT AC_EXEEXT
AC_LIBTOOL_DLOPEN AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS) AC_SUBST([LIBTOOL_DEPS])
dnl Checks for libraries. # Checks for libraries.
AC_PATH_XTRA AC_PATH_XTRA
AC_CHECK_LIB([Xxf86vm], [XF86VidModeSwitchToMode],
[LIBXXF86VM=-lXxf86vm], [LIBXXF86VM=],
[$X_LIBS -lXext -lX11])
AC_SUBST([LIBXXF86VM])
AC_CHECK_LIB(Xxf86vm,XF86VidModeSwitchToMode, # Checks for header files.
LIBXXF86VM=-lXxf86vm,LIBXXF86VM=,$X_LIBS -lXext -lX11) AC_HEADER_STDC
AC_SUBST(LIBXXF86VM) AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glx.h])
dnl Checks for header files.
AC_STDC_HEADERS
AC_HAVE_HEADERS( GL/gl.h GL/glu.h GL/glx.h )
save_CFLAGS="$CFLAGS" save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS"
AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,,,[#include <X11/Xlib.h>]) AC_CHECK_HEADERS([X11/extensions/xf86vmode.h], [], [], [#include <X11/Xlib.h>])
CFLAGS="$save_CFLAGS" CFLAGS="$save_CFLAGS"
dnl Checks for typedefs, structures, and compiler characteristics. # Checks for library functions.
dnl Checks for library functions.
AC_CHECK_LIBM AC_CHECK_LIBM
AC_SUBST(LIBM) AC_SUBST([LIBM])
dnl Build time configuration # Build time configuration.
AC_ARG_ENABLE([replace-glut],
AC_ARG_ENABLE(replace-glut, [AS_HELP_STRING([--enable-replace-glut],
[ --disable-replace-glut Coexist with existing glut library]) [be a replacement for GLUT @<:@default=yes@:>@])])
if test "x$enable_replace_glut" != xno if test "x$enable_replace_glut" != xno; then
then
LIBRARY=glut LIBRARY=glut
HEADER=glut.h HEADER=glut.h
else else
LIBRARY=freeglut LIBRARY=freeglut
HEADER= HEADER=
fi fi
AC_SUBST(LIBRARY) AC_SUBST([LIBRARY])
AC_SUBST(HEADER) AC_SUBST([HEADER])
AC_ARG_ENABLE(warnings, AC_ARG_ENABLE([warnings],
[ --enable-warnings Enable gcc compiler warnings], [AS_HELP_STRING([--enable-warnings],
if test "x$GCC" == xyes [use all gcc compiler warnings @<:@default=yes@:>@])])
then if test "x$enable_warnings" != xno -a "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall -Wno-parentheses -Werror" CFLAGS="$CFLAGS -Wall -pedantic -Werror"
fi) fi
AC_OUTPUT(\ # Generate output.
Makefile \ AC_CONFIG_FILES([Makefile
doc/Makefile \ doc/Makefile
progs/Makefile \ include/GL/Makefile
progs/demos/Makefile \ include/Makefile
progs/demos/CallbackMaker/Makefile \ progs/Makefile
progs/demos/Fractals/Makefile \ progs/demos/CallbackMaker/Makefile
progs/demos/Fractals_random/Makefile \ progs/demos/Fractals/Makefile
progs/demos/Lorenz/Makefile \ progs/demos/Fractals_random/Makefile
progs/demos/One/Makefile \ progs/demos/Lorenz/Makefile
progs/demos/shapes/Makefile \ progs/demos/Makefile
src/Makefile \ progs/demos/One/Makefile
include/Makefile \ progs/demos/shapes/Makefile
include/GL/Makefile \ src/Makefile])
) AC_OUTPUT