From 69203851dc12521c58b7838b864167ee1f983f00 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 14 Apr 2021 21:40:50 +0300
Subject: [PATCH] rename PKG_CONFIG_LIBS_PRIV to PKGCONFIG_LIBS_PRIV
i.e.: do not steal PKG_CONFIG namespace.
---
CMakeLists.txt | 4 ++--
configure | 6 +++---
configure.ac | 11 ++++++-----
sdl2.pc.in | 2 +-
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91c6d8e23..4a20abac1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2267,12 +2267,12 @@ if(NOT WINDOWS OR CYGWIN)
set(ENABLE_STATIC_FALSE "")
endif()
if(SDL_SHARED)
- set(PKG_CONFIG_LIBS_PRIV "
+ set(PKGCONFIG_LIBS_PRIV "
Libs.private:")
set(ENABLE_SHARED_TRUE "")
set(ENABLE_SHARED_FALSE "#")
else()
- set(PKG_CONFIG_LIBS_PRIV "")
+ set(PKGCONFIG_LIBS_PRIV "")
set(ENABLE_SHARED_TRUE "#")
set(ENABLE_SHARED_FALSE "")
endif()
diff --git a/configure b/configure
index c764f5cb1..65ed13a80 100755
--- a/configure
+++ b/configure
@@ -648,7 +648,7 @@ ENABLE_STATIC_FALSE
ENABLE_STATIC_TRUE
ENABLE_SHARED_FALSE
ENABLE_SHARED_TRUE
-PKG_CONFIG_LIBS_PRIV
+PKGCONFIG_LIBS_PRIV
SDL_RLD_FLAGS
SDL_STATIC_LIBS
SDL_LIBS
@@ -26022,12 +26022,12 @@ SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
if test x$enable_shared = xyes; then
- PKG_CONFIG_LIBS_PRIV="
+ PKGCONFIG_LIBS_PRIV="
Libs.private:"
ENABLE_SHARED_TRUE=
ENABLE_SHARED_FALSE="#"
else
- PKG_CONFIG_LIBS_PRIV=
+ PKGCONFIG_LIBS_PRIV=
ENABLE_SHARED_TRUE="#"
ENABLE_SHARED_FALSE=
fi
diff --git a/configure.ac b/configure.ac
index 43409b16b..33dcd5a80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,9 @@
dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.59])
AC_INIT
AC_CONFIG_SRCDIR([src/SDL.c])
-AC_CONFIG_HEADERS(include/SDL_config.h)
-AC_CONFIG_AUX_DIR(build-scripts)
+AC_CONFIG_HEADERS([include/SDL_config.h])
+AC_CONFIG_AUX_DIR([build-scripts])
AC_CONFIG_MACRO_DIR([acinclude])
dnl Save the CFLAGS to see whether they were passed in or generated
@@ -4416,12 +4417,12 @@ AC_SUBST(SDL_LIBS)
AC_SUBST(SDL_STATIC_LIBS)
AC_SUBST(SDL_RLD_FLAGS)
if test x$enable_shared = xyes; then
- PKG_CONFIG_LIBS_PRIV="
+ PKGCONFIG_LIBS_PRIV="
Libs.private:"
ENABLE_SHARED_TRUE=
ENABLE_SHARED_FALSE="#"
else
- PKG_CONFIG_LIBS_PRIV=
+ PKGCONFIG_LIBS_PRIV=
ENABLE_SHARED_TRUE="#"
ENABLE_SHARED_FALSE=
fi
@@ -4432,7 +4433,7 @@ else
ENABLE_STATIC_TRUE="#"
ENABLE_STATIC_FALSE=
fi
-AC_SUBST(PKG_CONFIG_LIBS_PRIV)
+AC_SUBST(PKGCONFIG_LIBS_PRIV)
AC_SUBST(ENABLE_SHARED_TRUE)
AC_SUBST(ENABLE_SHARED_FALSE)
AC_SUBST(ENABLE_STATIC_TRUE)
diff --git a/sdl2.pc.in b/sdl2.pc.in
index 9d76d4797..1b3c0dbe8 100644
--- a/sdl2.pc.in
+++ b/sdl2.pc.in
@@ -10,5 +10,5 @@ Description: Simple DirectMedia Layer is a cross-platform multimedia library des
Version: @SDL_VERSION@
Requires:
Conflicts:
-Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKG_CONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@
+Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ @PKGCONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@
Cflags: -I${includedir}/SDL2 @SDL_CFLAGS@