After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756690 - Add configure checking for GNU patch
Add configure checking for GNU patch
Status: RESOLVED FIXED
Product: gstreamer-vaapi
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gstreamer-vaapi maintainer(s)
gstreamer-vaapi maintainer(s)
Depends on:
Blocks: 750547
 
 
Reported: 2015-10-16 11:55 UTC by Lim Siew Hoon
Modified: 2015-10-16 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add configure checking for GNU patch tools and fixed configure checking YASM to correct squence (1.66 KB, patch)
2015-10-16 12:41 UTC, Lim Siew Hoon
committed Details | Review

Description Lim Siew Hoon 2015-10-16 11:55:19 UTC
Nice to add in the configure checking for GNU patch to avoid build compilation error for --enable-builtin-videoparsers.
Comment 1 Lim Siew Hoon 2015-10-16 12:10:44 UTC
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).
Comment 2 Lim Siew Hoon 2015-10-16 12:41:11 UTC
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).
Comment 3 Víctor Manuel Jáquez Leal 2015-10-16 14:57:46 UTC
Thanks!

Committed. I just changed a bit the commit log.