comparison configure @ 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
comparison
equal deleted inserted replaced
35722:9cfa30063480 35723:fb3523ff2ef4
5148 5148
5149 5149
5150 case "$_gif" in yes*) 5150 case "$_gif" in yes*)
5151 echocheck "broken giflib workaround" 5151 echocheck "broken giflib workaround"
5152 def_gif_tvt_hack='#define CONFIG_GIF_TVT_HACK 1' 5152 def_gif_tvt_hack='#define CONFIG_GIF_TVT_HACK 1'
5153 5153 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
5154 cat > $TMPC << EOF
5155 #include <stdio.h>
5156 #include <gif_lib.h>
5157 int main(void) {
5158 GifFileType gif = {.UserData = NULL};
5159 printf("UserData is at address %p\n", gif.UserData);
5160 return 0;
5161 }
5162 EOF
5163 if cc_check "$ld_gif" ; then
5164 def_gif_tvt_hack='#undef CONFIG_GIF_TVT_HACK' 5154 def_gif_tvt_hack='#undef CONFIG_GIF_TVT_HACK'
5165 echores "disabled" 5155 echores "disabled"
5166 else 5156 else
5167 echores "enabled" 5157 echores "enabled"
5168 fi 5158 fi