6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
From fd12fa91aa8e35dbd3ffa5bfe055baf6bde0cd63 Mon Sep 17 00:00:00 2001
From: Rodrigo Rebello <rprebello@gmail.com>
Date: Thu, 22 Oct 2015 15:28:11 -0200
Subject: [PATCH] configure: fix --with-PACKAGE option checks
Options of the form --with-PACKAGE[=yes] (e.g. --with-libpng), when
passed to configure, were being treated as though --without-PACKAGE had
been given.
Although the intention is to have configure check and use PACKAGE by
default if it's available, thus requiring the user to pass an option
only if PACKAGE must NOT be used, there are times when the opposite
might be desired (i.e. the user wants to indicate PACKAGE MUST be used).
Moreover, allowing --with-PACKAGE and behaving as if --without-PACKAGE
had been specified is in itself quite confusing.
Fix that by testing the result of 'with_PACKAGE' in configure.ac and
acting accordingly instead of blindly assuming a 'no'.
Upstream-status: accepted, not yet released.
https://github.com/chocolate-doom/chocolate-doom/pull/630
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
configure.ac | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index ee97fe2..7b03485 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,14 @@ AC_SDL_MAIN_WORKAROUND([
[Build without libsamplerate @<:@default=check@:>@]),
[],
[
- AC_CHECK_LIB(samplerate, src_new)
+ [with_libsamplerate=check]
+ ])
+ AS_IF([test "x$with_libsamplerate" != xno], [
+ AC_CHECK_LIB(samplerate, src_new, [], [
+ AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE(
+ [--with-libsamplerate was given, but test for libsamplerate failed])
+ ])
+ ])
])
# Check for libpng.
AC_ARG_WITH([libpng],
@@ -88,8 +95,15 @@ AC_SDL_MAIN_WORKAROUND([
[Build without libpng @<:@default=check@:>@]),
[],
[
+ [with_libpng=check]
+ ])
+ AS_IF([test "x$with_libpng" != xno], [
AC_CHECK_LIB(z, zlibVersion)
- AC_CHECK_LIB(png, png_get_io_ptr)
+ AC_CHECK_LIB(png, png_get_io_ptr, [], [
+ AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE(
+ [--with-libpng was given, but test for libpng failed])
+ ])
+ ])
])
AC_CHECK_LIB(m, log)
--
2.1.4
|