# HG changeset patch # User Andrew John Hughes # Date 1277247870 -3600 # Node ID 331abb57831ca7987054a94d294d0742f893d199 # Parent ceec3a6ce73277089784616c11ee8470e7f8134c Replace uname arch detection with use of AC_CANONICAL_HOST and sed. 2010-06-22 Andrew John Hughes * Makefile.am: (stamps/nbplatform.stamp): Don't run uname, trying to guess the architecture. The two scripts are nearly identical so just fix them by replacing the broken 'gcc32' call with $(CC) and -m64 with $(ARCHFLAG). * acinclude.m4: (VV_SET_ARCH_SETTINGS): Set ARCHFLAG according to the host detected by configure. * configure.ac: Call VV_SET_ARCH_SETTINGS. diff -r ceec3a6ce732 -r 331abb57831c ChangeLog --- a/ChangeLog Tue Jun 22 23:07:25 2010 +0100 +++ b/ChangeLog Wed Jun 23 00:04:30 2010 +0100 @@ -1,3 +1,17 @@ +2010-06-22 Andrew John Hughes + + * Makefile.am: + (stamps/nbplatform.stamp): Don't run + uname, trying to guess the architecture. + The two scripts are nearly identical so just + fix them by replacing the broken 'gcc32' call + with $(CC) and -m64 with $(ARCHFLAG). + * acinclude.m4: + (VV_SET_ARCH_SETTINGS): Set ARCHFLAG according + to the host detected by configure. + * configure.ac: + Call VV_SET_ARCH_SETTINGS. + 2010-06-22 Andrew John Hughes * .hgignore, diff -r ceec3a6ce732 -r 331abb57831c Makefile.am --- a/Makefile.am Tue Jun 22 23:07:25 2010 +0100 +++ b/Makefile.am Wed Jun 23 00:04:30 2010 +0100 @@ -112,18 +112,13 @@ mkdir -p netbeans/nbbuild/netbeans_visualvm/ ln -s $(SYSTEM_NETBEANS_DIR)/$(NB_PLATFORM)/ netbeans/nbbuild/netbeans_visualvm ln -s $(SYSTEM_NETBEANS_DIR)/harness/ netbeans/nbbuild/netbeans_visualvm - if ! (uname -a | grep x86_64) ; then \ - mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk15/linux ; \ - mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk16/linux ; \ - buildscript=./buildnative-linux.sh ; \ - else \ - mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk15/linux-amd64 ; \ - mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk16/linux-amd64 ; \ - buildscript=./buildnative-linux64.sh ; \ - fi ; \ + mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk15/linux-amd64 + mkdir -p netbeans/lib.profiler/release/lib/deployed/jdk16/linux-amd64 + ln -s linux-amd64 netbeans/lib.profiler/release/lib/deployed/jdk15/linux + ln -s linux-amd64 netbeans/lib.profiler/release/lib/deployed/jdk16/linux cd netbeans/lib.profiler/native/build && \ - sed -ie 's#gcc32#$(CC)#' $$buildscript && \ - JAVA_HOME_15=$(SYSTEM_JDK_DIR) JAVA_HOME_16=$(SYSTEM_JDK_DIR) $$buildscript + sed -i -e 's#gcc32#$(CC)#' -e 's#-m64#$(ARCHFLAG)#' buildnative-linux64.sh && \ + JAVA_HOME_15=$(SYSTEM_JDK_DIR) JAVA_HOME_16=$(SYSTEM_JDK_DIR) ./buildnative-linux64.sh JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) -Dpermit.jdk6.builds=true -f netbeans/nbbuild/build.xml bootstrap for dir in lib.profiler lib.profiler.charts lib.profiler.ui lib.profiler.common profiler ; do \ JAVA_HOME=$(SYSTEM_JDK_DIR) $(ANT) -Dpermit.jdk6.builds=true -Dbuildnumber=091221-4fc006d17cb1 \ diff -r ceec3a6ce732 -r 331abb57831c acinclude.m4 --- a/acinclude.m4 Tue Jun 22 23:07:25 2010 +0100 +++ b/acinclude.m4 Wed Jun 23 00:04:30 2010 +0100 @@ -107,3 +107,35 @@ fi AC_SUBST([$1]) ]) + +AC_DEFUN([VV_SET_ARCH_SETTINGS], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "${host_cpu}" in + x86_64) + ARCHFLAG="-m64" + ;; + i?86) + ARCHFLAG="-m32" + ;; + powerpc) + ARCHFLAG="-m32" + ;; + powerpc64) + ARCHFLAG="-m64" + ;; + sparc) + ARCHFLAG="-m32" + ;; + sparc64) + ARCHFLAG="-m64" + ;; + s390) + ARCHFLAG="-m31" + ;; + s390x) + ARCHFLAG="-m64" + ;; + esac + AC_SUBST(ARCHFLAG) +]) diff -r ceec3a6ce732 -r 331abb57831c configure.ac --- a/configure.ac Tue Jun 22 23:07:25 2010 +0100 +++ b/configure.ac Wed Jun 23 00:04:30 2010 +0100 @@ -37,6 +37,7 @@ IT_FIND_TOOL([WGET], [wget]) IT_FIND_TOOL([TAR], [tar]) +VV_SET_ARCH_SETTINGS VV_WITH_NETBEANS_PROFILER_ZIP VV_WITH_VISUALVM_ZIP VV_FIND_NETBEANS