changeset 35723:fb3523ff2ef4

configure: Simplify giflib workaround check through helper functions.
author diego
date Mon, 21 Jan 2013 23:05:25 +0000
parents 9cfa30063480
children 3df8c6cea70a
files configure
diffstat 1 files changed, 1 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Mon Jan 21 23:05:23 2013 +0000
+++ b/configure	Mon Jan 21 23:05:25 2013 +0000
@@ -5150,17 +5150,7 @@
 case "$_gif" in yes*)
   echocheck "broken giflib workaround"
   def_gif_tvt_hack='#define CONFIG_GIF_TVT_HACK 1'
-
-  cat > $TMPC << EOF
-#include <stdio.h>
-#include <gif_lib.h>
-int main(void) {
-  GifFileType gif = {.UserData = NULL};
-  printf("UserData is at address %p\n", gif.UserData);
-  return 0;
-}
-EOF
-  if cc_check "$ld_gif" ; then
+  if statement_check_broken stdio.h gif_lib.h 'GifFileType gif = {.UserData = NULL}; printf("UserData is at address %p\n", gif.UserData)' "$ld_gif" ; then
     def_gif_tvt_hack='#undef CONFIG_GIF_TVT_HACK'
     echores "disabled"
   else