[FFmpeg-devel] configure: error out if jni is enabled and not found

Submitted by Matthieu Bouron on March 15, 2017, 2:29 p.m.

Details

Message ID 20170315142908.9210-1-matthieu.bouron@gmail.com
State New
Headers show

Commit Message

Matthieu Bouron March 15, 2017, 2:29 p.m.
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthieu Bouron March 18, 2017, 11:27 a.m.
On Wed, Mar 15, 2017 at 03:29:08PM +0100, Matthieu Bouron wrote:
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 1e2e774950..a4890ca0d3 100755
> --- a/configure
> +++ b/configure
> @@ -5744,7 +5744,7 @@ enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h hea
>  enabled gmp               && require2 gmp gmp.h mpz_export -lgmp
>  enabled gnutls            && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
>  enabled jni               && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads &&
> -                               check_lib2 "dlfcn.h" dlopen -ldl; }
> +                               check_lib2 "dlfcn.h" dlopen -ldl || die "ERROR: JNI not found"; }
>  enabled ladspa            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
>  enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
>  enabled libass            && require_pkg_config libass ass/ass.h ass_library_init
> -- 
> 2.12.0
> 

I'll apply the patch in one day if there is no objection.

Matthieu

[...]
Matthieu Bouron March 20, 2017, 4:50 p.m.
On Sat, Mar 18, 2017 at 12:27:20PM +0100, Matthieu Bouron wrote:
> On Wed, Mar 15, 2017 at 03:29:08PM +0100, Matthieu Bouron wrote:
> > ---
> >  configure | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/configure b/configure
> > index 1e2e774950..a4890ca0d3 100755
> > --- a/configure
> > +++ b/configure
> > @@ -5744,7 +5744,7 @@ enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h hea
> >  enabled gmp               && require2 gmp gmp.h mpz_export -lgmp
> >  enabled gnutls            && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
> >  enabled jni               && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads &&
> > -                               check_lib2 "dlfcn.h" dlopen -ldl; }
> > +                               check_lib2 "dlfcn.h" dlopen -ldl || die "ERROR: JNI not found"; }
> >  enabled ladspa            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
> >  enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
> >  enabled libass            && require_pkg_config libass ass/ass.h ass_library_init
> > -- 
> > 2.12.0
> > 
> 
> I'll apply the patch in one day if there is no objection.

Pushed.

[...]

Patch hide | download patch | download mbox

diff --git a/configure b/configure
index 1e2e774950..a4890ca0d3 100755
--- a/configure
+++ b/configure
@@ -5744,7 +5744,7 @@  enabled frei0r            && { check_header frei0r.h || die "ERROR: frei0r.h hea
 enabled gmp               && require2 gmp gmp.h mpz_export -lgmp
 enabled gnutls            && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
 enabled jni               && { [ $target_os = "android" ] && check_header jni.h && enabled pthreads &&
-                               check_lib2 "dlfcn.h" dlopen -ldl; }
+                               check_lib2 "dlfcn.h" dlopen -ldl || die "ERROR: JNI not found"; }
 enabled ladspa            && { check_header ladspa.h || die "ERROR: ladspa.h header not found"; }
 enabled libiec61883       && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
 enabled libass            && require_pkg_config libass ass/ass.h ass_library_init