| 1 | dnl Process this file with autoconf to produce a configure script. | 
|---|
| 2 |  | 
|---|
| 3 | dnl This file is part of a free win32 library | 
|---|
| 4 | dnl | 
|---|
| 5 | dnl This program is distributed in the hope that it will be useful, | 
|---|
| 6 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 7 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 8 | dnl GNU General Public License for more details. | 
|---|
| 9 |  | 
|---|
| 10 | AC_PREREQ(2.12) | 
|---|
| 11 | AC_INIT(lib/scrnsave.c) | 
|---|
| 12 |  | 
|---|
| 13 | AC_CANONICAL_SYSTEM | 
|---|
| 14 |  | 
|---|
| 15 | dnl Find install command | 
|---|
| 16 | AC_PROG_INSTALL | 
|---|
| 17 |  | 
|---|
| 18 | dnl check for cc and CFLAGS | 
|---|
| 19 | CFLAGS=${CFLAGS-"-O2 -g"} | 
|---|
| 20 | AC_CHECK_TOOL(CC, gcc, gcc) | 
|---|
| 21 | AC_SUBST(CC) | 
|---|
| 22 | AC_SUBST(CFLAGS) | 
|---|
| 23 |  | 
|---|
| 24 | dnl check for various tools | 
|---|
| 25 | AC_CHECK_TOOL(AR, ar, ar) | 
|---|
| 26 | AC_SUBST(AR) | 
|---|
| 27 | AC_CHECK_TOOL(AS, as, as) | 
|---|
| 28 | AC_SUBST(AS) | 
|---|
| 29 | AC_CHECK_TOOL(RANLIB, ranlib, ranlib) | 
|---|
| 30 | AC_SUBST(RANLIB) | 
|---|
| 31 | AC_CHECK_TOOL(LD, ld, ld) | 
|---|
| 32 | AC_SUBST(LD) | 
|---|
| 33 | AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool) | 
|---|
| 34 | AC_SUBST(DLLTOOL) | 
|---|
| 35 | AC_CHECK_TOOL(WINDRES, windres, windres) | 
|---|
| 36 | AC_SUBST(WINDRES) | 
|---|
| 37 |  | 
|---|
| 38 | AC_MSG_CHECKING([for build environment]) | 
|---|
| 39 | case "$build_alias" in | 
|---|
| 40 | *-mingw*) BUILDENV=mingw;; | 
|---|
| 41 | *-cygwin*) BUILDENV=cygwin;; | 
|---|
| 42 | esac | 
|---|
| 43 | if test -z "$BUILDENV"; then | 
|---|
| 44 | AC_MSG_RESULT(standard) | 
|---|
| 45 | else | 
|---|
| 46 | AC_MSG_RESULT($BUILDENV) | 
|---|
| 47 | fi | 
|---|
| 48 | AC_SUBST(BUILDENV) | 
|---|
| 49 |  | 
|---|
| 50 | AC_OUTPUT(Makefile lib/Makefile lib/ddk/Makefile lib/directx/Makefile) | 
|---|