Index: build/autotools/configure.ac
===================================================================
--- build/autotools/configure.ac	(revision 12521)
+++ build/autotools/configure.ac	(working copy)
@@ -321,11 +321,11 @@
 AC_SUBST([MINGWSTDTHREADS_CPPFLAGS])
 
 # libmodplug emulation
-AC_ARG_ENABLE([libopenmpt_modplug], AS_HELP_STRING([--enable-libopenmpt_modplug], [Enable the libopenmpt_modplug emulation library of the libmodplug interface.]))
+AC_ARG_ENABLE([libopenmpt_modplug], AS_HELP_STRING([--enable-libopenmpt_modplug], [DEPRECATED (use separate libopenmpt-modplug source package instead): Enable the libopenmpt_modplug emulation library of the libmodplug interface.]))
 AM_CONDITIONAL([ENABLE_LIBOPENMPT_MODPLUG], [test "x$enable_libopenmpt_modplug" = "xyes"])
 
 # libmodplug replacement
-AC_ARG_ENABLE([libmodplug], AS_HELP_STRING([--enable-libmodplug], [Enable libmodplug replacement library based on libopenmpt.
+AC_ARG_ENABLE([libmodplug], AS_HELP_STRING([--enable-libmodplug], [DEPRECATED (use separate libopenmpt-modplug source package instead): Enable libmodplug replacement library based on libopenmpt.
 WARNING: This will replace your current libmodplug installation.
 CAUTION: The emulation of the libmodplug interface is not complete as libmodplug exposes lots of internal implementation details. If any of those is used by an application, the emulation via libopenmpt will fail and/or crash.
 ]))
Index: libopenmpt/libopenmpt_modplug.c
===================================================================
--- libopenmpt/libopenmpt_modplug.c	(revision 12521)
+++ libopenmpt/libopenmpt_modplug.c	(working copy)
@@ -28,6 +28,33 @@
 #include <stdlib.h>
 #include <string.h>
 
+#define MPT_PP_DEFER(m, ...) m(__VA_ARGS__)
+#define MPT_PP_STRINGIFY(x) #x
+#define MPT_PP_JOIN_HELPER(a, b) a ## b
+#define MPT_PP_JOIN(a, b) MPT_PP_JOIN_HELPER(a, b)
+#define MPT_PP_UNIQUE_IDENTIFIER(prefix) MPT_PP_JOIN(prefix , __LINE__)
+#if defined(__clang__)
+	#define MPT_WARNING(text) _Pragma(MPT_PP_STRINGIFY(GCC warning text))
+#elif defined(__GNUC__)
+	#define MPT_WARNING(text) _Pragma(MPT_PP_STRINGIFY(GCC warning text))
+#elif defined(_MSC_VER)
+	#define MPT_WARNING(text) __pragma(message(__FILE__ "(" MPT_PP_DEFER(MPT_PP_STRINGIFY, __LINE__) "): Warning: " text))
+#elif defined(__cplusplus)
+	#if (__cplusplus >= 201402L)
+		#define MPT_WARNING(text) \
+			static inline int MPT_PP_UNIQUE_IDENTIFIER(MPT_WARNING_NAME) () noexcept { \
+				int warning [[deprecated("Warning: " text)]] = 0; \
+				return warning; \
+			} \
+		/**/
+	#else
+		#define MPT_WARNING(text) /**/
+	#endif
+#else
+	#define MPT_WARNING(text) /**/
+#endif
+MPT_WARNING("libopenmpt-modplug from the libopenmpt source package is deprecated. Please migrate client code to native libopenmpt C or C++ APIs, or use the separate libopenmpt-modplug source package instead.")
+
 #define MODPLUG_BUILD
 #ifdef _MSC_VER
 #ifdef MPT_BUILD_MSVC_SHARED
Index: libopenmpt/libopenmpt_modplug_cpp.cpp
===================================================================
--- libopenmpt/libopenmpt_modplug_cpp.cpp	(revision 12521)
+++ libopenmpt/libopenmpt_modplug_cpp.cpp	(working copy)
@@ -46,6 +46,33 @@
 #include <cstdlib>
 #include <cstring>
 
+#define MPT_PP_DEFER(m, ...) m(__VA_ARGS__)
+#define MPT_PP_STRINGIFY(x) #x
+#define MPT_PP_JOIN_HELPER(a, b) a ## b
+#define MPT_PP_JOIN(a, b) MPT_PP_JOIN_HELPER(a, b)
+#define MPT_PP_UNIQUE_IDENTIFIER(prefix) MPT_PP_JOIN(prefix , __LINE__)
+#if defined(__clang__)
+	#define MPT_WARNING(text) _Pragma(MPT_PP_STRINGIFY(GCC warning text))
+#elif defined(__GNUC__)
+	#define MPT_WARNING(text) _Pragma(MPT_PP_STRINGIFY(GCC warning text))
+#elif defined(_MSC_VER)
+	#define MPT_WARNING(text) __pragma(message(__FILE__ "(" MPT_PP_DEFER(MPT_PP_STRINGIFY, __LINE__) "): Warning: " text))
+#elif defined(__cplusplus)
+	#if (__cplusplus >= 201402L)
+		#define MPT_WARNING(text) \
+			static inline int MPT_PP_UNIQUE_IDENTIFIER(MPT_WARNING_NAME) () noexcept { \
+				int warning [[deprecated("Warning: " text)]] = 0; \
+				return warning; \
+			} \
+		/**/
+	#else
+		#define MPT_WARNING(text) /**/
+	#endif
+#else
+	#define MPT_WARNING(text) /**/
+#endif
+MPT_WARNING("libopenmpt-modplug from the libopenmpt source package is deprecated. Please migrate client code to native libopenmpt C or C++ APIs, or use the separate libopenmpt-modplug source package instead.")
+
 #define MODPLUG_BUILD
 #ifdef _MSC_VER
 /* libmodplug C++ header is broken for MSVC DLL builds */
