GNOME Bugzilla – Bug 756690
Add configure checking for GNU patch
Last modified: 2015-10-16 18:56:46 UTC
Nice to add in the configure checking for GNU patch to avoid build compilation error for --enable-builtin-videoparsers.
Plan to add configure.ac inside: AC_ARG_VAR([PATCH], [Path to patch program, if any]) AC_PATH_PROG([PATCH], [patch]) if test -z "$PATCH" -a "$enable_builtin_videoparsers" = "yes"; then AC_MSG_ERROR([patch is needed to apply patches for videoparsers]) fi But I found out got some minor issue as below configure.ac, it didn't pop up the error message for me ever my system didn't install GNU patch. But the checking did showing "checking PATCH ...no" if --enable-builtin-videopersers if my code fixed as below. It also happen for YASM for --enable-builtin-libvpx if ever your YASM is not install in the machine. dnl Check for tools AC_PROG_CC AM_PROG_CC_C_O AC_ARG_VAR([GIT], [Path to git program, if any]) AC_PATH_PROG([GIT], [git]) AM_CONDITIONAL([HAVE_GIT], [test -n "$GIT"]) AC_ARG_VAR([YASM], [Path to yasm program, if any]) AC_PATH_PROG([YASM], [yasm]) if test -z "$YASM" -a "$enable_builtin_libvpx" = "yes"; then AC_MSG_ERROR([yasm is needed to build libvpx sources]) fi AC_ARG_VAR([PATCH], [Path to patch program, if any]) AC_PATH_PROG([PATCH], [patch]) if test -z "$PATCH" -a "$enable_builtin_videoparsers" = "yes"; then AC_MSG_ERROR([patch is needed to apply patch for videoparsers]) fi dnl Initialize libtool LT_PREREQ([2.2]) LT_INIT AC_ARG_ENABLE(builtin_videoparsers, AS_HELP_STRING([--enable-builtin-videoparsers], [enable built-in videoparsers @<:@default=yes@:>@]), [], [enable_builtin_videoparsers="yes"]) AC_ARG_ENABLE(builtin_codecparsers, AS_HELP_STRING([--enable-builtin-codecparsers], [enable built-in codecparsers @<:@default=yes@:>@]), [], [enable_builtin_codecparsers="yes"]) AC_ARG_ENABLE(builtin_libvpx, AS_HELP_STRING([--enable-builtin-libvpx], [enable built-in libvpx @<:@default=yes@:>@]), [], [enable_builtin_libvpx="yes"]) So, the configure checking for YASM and PATCH should move after AC_ARG_ENABLE(builtin_libvpx... and AC_ARG_ENABLE(builtin_videoparsers).
Created attachment 313457 [details] [review] Add configure checking for GNU patch tools and fixed configure checking YASM to correct squence Sorry. In previous comment, i was mention is add checking configure GNU patch inside configure.ac not add extra configure.ac. But the the checking tools YASM should be done after AC_ARG_ENABLE(buitin_libvpx). Else if ever the YASM didn't install in the system, it won't print out the AC_MSG_ERROR. It will just print message checking yasm...no. And continue run configure until end. Same for checking tools GNU patch also need to put after AC_ARG_ENABLE(builtin_videoparsers).
Thanks! Committed. I just changed a bit the commit log.