Cross-compiling 3.0.7

Jon Masters jonathan at jonmasters.org
Thu Oct 21 11:54:30 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

I needed to cross-compile Samba for PowerPC recently. The following
bodge was necessary - it needs cleanup before generic use. One bug
follows the same formula as that mentioned by Dan Kegel previously,
another is an issue detecting we do IFCONF so e.g. nmbd wibbles.

Cheers,

Jon.

- --- samba-3.0.7-orig/source/configure.in        2004-09-12
04:47:18.000000000 +0100
+++ samba-3.0.7/source/configure.in     2004-10-20 16:50:51.000000000 +0100
@@ -992,13 +992,18 @@
~ AC_CHECK_FUNCS(pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64)
~ AC_CHECK_FUNCS(open64 _open64 __open64 creat64)

+# Added some hacks below by jcm as a quick and dirty hack for cross
compiling
+# We need to make Samba know we can do IFCONF.
+# jcm at resonance.com - 19/10/2004.
+AC_DEFINE(HAVE_IFACE_IFCONF,1,[Whether iface ifconf is available])
+
~ #
~ #
~ #
~ case "$host_os" in
~     *linux*)
~        # glibc <= 2.3.2 has a broken getgrouplist
- -       AC_TRY_RUN([
+       AC_TRY_COMPILE([
~ #include <unistd.h>
~ #include <sys/utsname.h>
~ main() {
@@ -1479,10 +1484,10 @@
~ fi

~ AC_CACHE_CHECK([if gettimeofday takes tz
argument],samba_cv_HAVE_GETTIMEOFDAY_TZ,[
- -AC_TRY_RUN([
+AC_TRY_COMPILE([
~ #include <sys/time.h>
- -#include <unistd.h>
- -main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}],
+#include <unistd.h>],
+[struct timeval tv; exit(gettimeofday(&tv, NULL));],

samba_cv_HAVE_GETTIMEOFDAY_TZ=yes,samba_cv_HAVE_GETTIMEOFDAY_TZ=no,samba_cv_HAVE_GETTIMEOFDAY_TZ=cross)])
~ if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
~     AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is
available])
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBd6N2eTyyexZHHxERAv/PAJ9faKOOyPTiuFGi43NId2EQy9EsFQCeOOi6
vxKv5Lcn/t75n0JviXgDcNg=
=8i0D
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list