Ticket #262: pygobject-2.18.0-cross-generate-constants.patch

File pygobject-2.18.0-cross-generate-constants.patch, 1.0 KB (added by pierrearinsal, 3 years ago)
  • configure.ac

    old new  
    214214 
    215215fi 
    216216 
     217dnl Get the host compiler if cross-compiling 
     218dnl 
     219AM_CONDITIONAL(CROSS_COMPILING, [ test $cross_compiling = yes ]) 
     220AC_MSG_CHECKING([for CC_FOR_BUILD]) 
     221if test "x${CC_FOR_BUILD+set}" != "xset" ; then 
     222  if test "x$cross_compiling" = "xyes" ; then 
     223    CC_FOR_BUILD=${CC_FOR_BUILD-gcc} 
     224  else 
     225    CC_FOR_BUILD=${CC} 
     226  fi 
     227fi 
     228AC_MSG_RESULT([$CC_FOR_BUILD]) 
     229AC_SUBST(CC_FOR_BUILD) 
     230 
    217231AC_CONFIG_FILES( 
    218232  Makefile 
    219233  pygobject-2.0.pc 
  • gobject/Makefile.am

    old new  
    7171if PLATFORM_WIN32 
    7272_gobject_la_CFLAGS += -DPLATFORM_WIN32 
    7373endif 
     74 
     75generate-constants$(EXEEXT): generate-constants.c 
     76        $(CC) $(generate_constants_CFLAGS) -E -o generate-constants.pre.c generate-constants.c 
     77        $(CC_FOR_BUILD) -o $@ generate-constants.pre.c 
     78        rm -f generate-constants.pre.c 
     79 
    7480 
    7581