summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2009-01-15 20:57:42 -0800
committerJeremy Huddleston <jeremyhu@freedesktop.org>2009-01-15 20:57:42 -0800
commitf020900641b44a1142e5c2198e9678de2744454e (patch)
tree9cf52a46659b349ef91e2a198a7b3309d402bd45
parenta5e191578e50a249e67fa26d273db4aca26ee996 (diff)
XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation
-rw-r--r--configure.ac4
-rw-r--r--hw/xquartz/bundle/Makefile.am5
-rwxr-xr-xhw/xquartz/bundle/mk_bundke.sh16
-rw-r--r--hw/xquartz/mach-startup/Makefile.am4
-rw-r--r--include/dix-config.h.in3
5 files changed, 20 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index da5f488f9..a90d40055 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,3 +41,5 @@ dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just
dnl dix/).
-AC_CONFIG_HEADERS(include/dix-config.h)
+AC_CONFIG_HEADERS(include/dix-config.h, [mv include/dix-config.h include/dix-config.h.tmp
+ sed 's|/undef|#undef|' < include/dix-config.h.tmp > include/dix-config.h
+ rm include/dix-config.h.tmp])
dnl xorg-config.h covers the Xorg DDX.
diff --git a/hw/xquartz/bundle/Makefile.am b/hw/xquartz/bundle/Makefile.am
index 03fa1ddb1..963327bb9 100644
--- a/hw/xquartz/bundle/Makefile.am
+++ b/hw/xquartz/bundle/Makefile.am
@@ -7,3 +7,6 @@ CPP_FILES_FLAGS = \
install-data-hook:
- ./mk_bundke.sh $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app
+ $(srcdir)/mk_bundke.sh $(srcdir) $(builddir) $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app install
+
+uninstall-hook:
+ $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app
diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh
index 7c8d14898..c85b21765 100755
--- a/hw/xquartz/bundle/mk_bundke.sh
+++ b/hw/xquartz/bundle/mk_bundke.sh
@@ -4,3 +4,5 @@
-BUNDLE_ROOT=$1
+SRCDIR=$1
+BUILDDIR=$2
+BUNDLE_ROOT=$3
@@ -12,3 +14,3 @@ for lang in ${localities} ; do
for f in InfoPlist.strings Localizable.strings main.nib/keyedobjects.nib ; do
- install -m 644 Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
+ install -m 644 ${SRCDIR}/Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f}
done
@@ -16,10 +18,10 @@ done
-install -m 644 Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
-install -m 644 Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
+install -m 644 ${SRCDIR}/Resources/English.lproj/main.nib//designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib
+install -m 644 ${SRCDIR}/Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources
-install -m 644 Info.plist ${BUNDLE_ROOT}/Contents
-install -m 644 PkgInfo ${BUNDLE_ROOT}/Contents
+install -m 644 ${BUILDDIR}/Info.plist ${BUNDLE_ROOT}/Contents
+install -m 644 ${SRCDIR}/PkgInfo ${BUNDLE_ROOT}/Contents
mkdir -p ${BUNDLE_ROOT}/Contents/MacOS
-install -m 755 X11.sh ${BUNDLE_ROOT}/Contents/MacOS/X11
+install -m 755 ${SRCDIR}/X11.sh ${BUNDLE_ROOT}/Contents/MacOS/X11
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 40060d01b..b0112949d 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -67,4 +67,4 @@ CLEANFILES = \
-$(BUILT_SOURCES): mach_startup.defs
- mig -sheader mach_startupServer.h mach_startup.defs
+$(BUILT_SOURCES): $(srcdir)/mach_startup.defs
+ mig -sheader mach_startupServer.h $(srcdir)/mach_startup.defs
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 8e047c491..e1d226c84 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -436,3 +436,4 @@
#elif !defined(__LP64__) && defined(_XSERVER64)
-#undef _XSERVER64
+/* configure mangles #undef, so we fix this in AC_CONFIG_HEADERS post process */
+/undef _XSERVER64
#endif