diff --git a/configure b/configure index b1674916a135b137a3f4222d3a4455356e09f38f..e7b06d4305de0ace13bc10e2842b7517941e7ae9 100755 --- a/configure +++ b/configure @@ -1922,6 +1922,7 @@ HEADERS_LIST=" dxgidebug_h dxva_h ES2_gl_h + gsm_h io_h machine_ioctl_bt848_h machine_ioctl_meteor_h @@ -5921,7 +5922,9 @@ enabled libfreetype && require_pkg_config libfreetype freetype2 "ft2build. enabled libfribidi && require_pkg_config libfribidi fribidi fribidi.h fribidi_version_info enabled libgme && { check_pkg_config libgme libgme gme/gme.h gme_new_emu || require libgme gme/gme.h gme_new_emu -lgme -lstdc++; } -enabled libgsm && require libgsm gsm.h gsm_create -lgsm +enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do + check_lib libgsm "${gsm_hdr}" gsm_create -lgsm && break; + done || die "ERROR: libgsm not found"; } enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc $pthreads_extralibs enabled libkvazaar && require_pkg_config libkvazaar "kvazaar >= 0.8.1" kvazaar.h kvz_api_get # While it may appear that require is being used as a pkg-config diff --git a/libavcodec/libgsmdec.c b/libavcodec/libgsmdec.c index 85bb022b97e4d841522b8bc2ecb22cd51dbe0265..a503215f679b0be08590e3f2e3c2caaad06ce52d 100644 --- a/libavcodec/libgsmdec.c +++ b/libavcodec/libgsmdec.c @@ -27,7 +27,12 @@ // The idiosyncrasies of GSM-in-WAV are explained at http://kbs.cs.tu-berlin.de/~jutta/toast.html +#include "config.h" +#if HAVE_GSM_H #include <gsm.h> +#else +#include <gsm/gsm.h> +#endif #include "libavutil/channel_layout.h" #include "libavutil/common.h" diff --git a/libavcodec/libgsmenc.c b/libavcodec/libgsmenc.c index b60b23b31dc04bba71b890a23c38330b11063afe..e25db95181009af11b373c834f2265b240e25040 100644 --- a/libavcodec/libgsmenc.c +++ b/libavcodec/libgsmenc.c @@ -27,7 +27,12 @@ // The idiosyncrasies of GSM-in-WAV are explained at http://kbs.cs.tu-berlin.de/~jutta/toast.html +#include "config.h" +#if HAVE_GSM_H #include <gsm.h> +#else +#include <gsm/gsm.h> +#endif #include "libavutil/common.h"