Only build pat2inc and declare it as dep for pattern.inc when not cross-compiling.
[gnushogi.git] / configure.ac
index b312ce8..f800cf9 100644 (file)
@@ -91,7 +91,6 @@ AC_CHECK_SIZEOF(long)
 AC_MSG_NOTICE([library functions])
 
 AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MALLOC
 AC_TYPE_SIGNAL
 AC_CHECK_FUNCS([gettimeofday memset pow])
 AC_CHECK_FUNCS([strchr strerror strrchr strstr strtol])
@@ -113,6 +112,14 @@ AC_SUBST([PROGNAME], [gnuminishogi])
 ])
 
 ##########
+
+# don't build pat2inc when cross-compiling, we don't need it
+if test "$cross_compiling" = no; then
+   AC_SUBST([PAT2INC], [pat2inc])
+   AC_SUBST([PAT2INCEXE], [pat2inc$(EXEEXT)])
+fi
+
+##########
 AC_CONFIG_FILES([Makefile
                  gnushogi/Makefile
                  win32/config.h