Fix cross-compiling of ioctlsort
Use the AX_PROG_CC_FOR_BUILD helper to set up build settings when cross
compiling. This way ioctlsort uses the build tools all the time.
* configure.ac: Call AX_PROG_CC_FOR_BUILD.
* Makefile.am (ioctlsort_CC): Set to CC_FOR_BUILD.
(ioctlsort_CPPFLAGS): Change CPPFLAGS to CPPFLAGS_FOR_BUILD.
(ioctlsort_CFLAGS): Change CFLAGS to CFLAGS_FOR_BUILD.
(ioctlsort_LDFLAGS): Change LDFLAGS to LDFLAGS_FOR_BUILD.
(ioctlsort_LD): Delete.
(ioctlsort%): Change to ioctlsort%$(BUILD_EXEEXT). Use ioctlsort_CFLAGS.
* m4/ax_prog_cc_for_build.m4: Import from the autoconf-archive package.
diff --git a/configure.ac b/configure.ac
index 0d009ea..5e198ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,7 @@
AC_CANONICAL_HOST
AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
AC_USE_SYSTEM_EXTENSIONS
AC_MSG_CHECKING([for supported architecture])