AM_INIT_AUTOMAKE([foreign])
AC_CANONICAL_HOST
+case $host in
+ *darwin*)
+ RPCGENFLAGS=-DU_INT64_PLATTFORM_TYPE="u_int64_t"
+ ;;
+ *)
+ ;;
+esac
+
+AC_SUBST(RPCGENFLAGS)
+
# Work around stupid autoconf default cflags. pt 1
SAVE_CFLAGS="x${CFLAGS}"
$(mount_GENERATED) : mount-stamp
mount-stamp : mount.x
rm -f $(mount_GENERATED)
- rpcgen -h $< > libnfs-raw-mount.h
- rpcgen -c $< | sed -e "s/#include \".*mount.h\"/#include \"libnfs-raw-mount.h\"/" > libnfs-raw-mount.c
+ rpcgen -h @RPCGENFLAGS@ $< > libnfs-raw-mount.h
+ rpcgen -c @RPCGENFLAGS@ $< | sed -e "s/#include \".*mount.h\"/#include \"libnfs-raw-mount.h\"/" > libnfs-raw-mount.c
touch mount-stamp
$(nfs_GENERATED) : nfs-stamp
nfs-stamp : nfs.x
rm -f $(nfs_GENERATED)
- rpcgen -h $< > libnfs-raw-nfs.h
- rpcgen -c $< | sed -e "s/#include \".*nfs.h\"/#include \"libnfs-raw-nfs.h\"/" > libnfs-raw-nfs.c
+ rpcgen -h @RPCGENFLAGS@ $< > libnfs-raw-nfs.h
+ rpcgen -c @RPCGENFLAGS@ $< | sed -e "s/#include \".*nfs.h\"/#include \"libnfs-raw-nfs.h\"/" > libnfs-raw-nfs.c
touch nfs-stamp
$(portmap_GENERATED) : portmap-stamp
portmap-stamp : portmap.x
rm -f $(portmap_GENERATED)
- rpcgen -h $< > libnfs-raw-portmap.h
- rpcgen -c $< | sed -e "s/#include \".*portmap.h\"/#include \"libnfs-raw-portmap.h\"/" > libnfs-raw-portmap.c
+ rpcgen -h @RPCGENFLAGS@ $< > libnfs-raw-portmap.h
+ rpcgen -c @RPCGENFLAGS@ $< | sed -e "s/#include \".*portmap.h\"/#include \"libnfs-raw-portmap.h\"/" > libnfs-raw-portmap.c
touch portmap-stamp
$(rquota_GENERATED) : rquota-stamp
rquota-stamp : rquota.x
rm -f $(rquota_GENERATED)
- rpcgen -h $< > libnfs-raw-rquota.h
- rpcgen -c $< | sed -e "s/#include \".*rquota.h\"/#include \"libnfs-raw-rquota.h\"/" > libnfs-raw-rquota.c
+ rpcgen -h @RPCGENFLAGS@ $< > libnfs-raw-rquota.h
+ rpcgen -c @RPCGENFLAGS@ $< | sed -e "s/#include \".*rquota.h\"/#include \"libnfs-raw-rquota.h\"/" > libnfs-raw-rquota.c
touch rquota-stamp