comparison test/configure.in @ 1550:31c2b8e4885e

Fixed bug #166 From the autoconf obsolete macros documentation: Macro: AC_CANONICAL_SYSTEM Determine the system type and set output variables to the names of the canonical system types. See section Getting the Canonical System Type, for details about the variables this macro sets. The user is encouraged to use either AC_CANONICAL_BUILD, or AC_CANONICAL_HOST, or AC_CANONICAL_TARGET, depending on the needs. Using AC_CANONICAL_TARGET is enough to run the two other macros. From the documentation for the canonical environments: case $target in i386-*-mach* | i386-*-gnu*) obj_format=aout emulation=mach bfd_gas=yes ;; i960-*-bout) obj_format=bout ;; esac Note that the above example uses $target because it's taken from a tool which can be built on some architecture ($build), run on another ($host), but yet handle data for a third architecture ($target). Such tools are usually part of a compiler suite, they generate code for a specific $target. However $target should be meaningless for most packages. If you want to base a decision on the system where your program will be run, make sure you use the $host variable.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 19 Mar 2006 05:27:22 +0000
parents 835c1831f903
children 0a53c90a37f9 a7cda692b681
comparison
equal deleted inserted replaced
1549:066236f0cbf0 1550:31c2b8e4885e
1 dnl Process this file with autoconf to produce a configure script. 1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(README) 2 AC_INIT(README)
3 3
4 dnl Detect the canonical host and target build environment 4 dnl Detect the canonical build and host environments
5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts) 5 AC_CONFIG_AUX_DIRS($srcdir/../build-scripts)
6 AC_CANONICAL_SYSTEM 6 AC_CANONICAL_HOST
7 7
8 dnl Check for tools 8 dnl Check for tools
9 9
10 AC_PROG_CC 10 AC_PROG_CC
11 11
12 dnl Check for compiler environment 12 dnl Check for compiler environment
13 13
14 AC_C_CONST 14 AC_C_CONST
15 15
16 dnl Figure out which math library to use 16 dnl Figure out which math library to use
17 case "$target" in 17 case "$host" in
18 *-*-cygwin* | *-*-mingw32*) 18 *-*-cygwin* | *-*-mingw32*)
19 EXE=".exe" 19 EXE=".exe"
20 MATHLIB="" 20 MATHLIB=""
21 SYS_GL_LIBS="-lopengl32" 21 SYS_GL_LIBS="-lopengl32"
22 ;; 22 ;;