From 69e87bc5acb5c8788065fc589bd29a61ba7508bd Mon Sep 17 00:00:00 2001 From: Bill Williams Date: Wed, 6 May 2009 14:19:43 -0500 Subject: [PATCH] Updates to autoconf: fixed test suite detection of mutatee compilers, allowed install directories to default to old style in make.config if someone's using an old make.config.local. --- autodyninst/make.config.local.in | 18 ++++++++++----- configure | 50 +++++++++++++++------------------------- configure.in | 13 +++++------ make.config | 6 ++--- 4 files changed, 39 insertions(+), 48 deletions(-) diff --git a/autodyninst/make.config.local.in b/autodyninst/make.config.local.in index 3eddbeb..9c4ebd0 100644 --- a/autodyninst/make.config.local.in +++ b/autodyninst/make.config.local.in @@ -4,11 +4,18 @@ BUILD_MARK= BUILD_NUM=-576 #Are any alternatives to g++ available? -ICC_PROG = @_ICC_@ -PGC_PROG = @_PGC_@ -PGCXX_PROG = @_PGCXX_@ -NATIVECC_PROG = @_CC_@ -NATIVECXX_PROG = @_CXX_@ + +M_intel_CC = @_ICC_@ + +ifdef M_intel_CC +ICC = 1 +endif + +M_pg_cc = @_PGC_@ +M_pg_cxx = @_PGCXX_@ +# PGI is defined in environment to point to path; needed for licensing, so we can rely on it +M_native_cc = @_CC_@ +M_native_cxx = @_CXX_@ #TCL/TK is required for all Paradyn builds, but not DyninstAPI TCLTK_LIB_DIR = @TCLTK_LIB_DIR@ @@ -52,7 +59,6 @@ FLEX_DIR = @LIBFLEX_LIB_DIR@ USES_MMTIMER = @MMTIMER@ -PAPI_ROOT = @PAPI_ROOT@ AC_DEF = @DEFS@ @STACKPROT@ diff --git a/configure b/configure index 89ebbad..5b05801 100755 --- a/configure +++ b/configure @@ -1901,7 +1901,6 @@ do done done - test -z "$ac_cv_path__ICC_" && ac_cv_path__ICC_="false" ;; esac fi @@ -1919,34 +1918,29 @@ fi set dummy pgcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path__PGC_+set}" = set; then +if test "${ac_cv_prog__PGC_+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $_PGC_ in - [\\/]* | ?:[\\/]*) - ac_cv_path__PGC_="$_PGC_" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$_PGC_"; then + ac_cv_prog__PGC_="$_PGC_" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path__PGC_="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog__PGC_="pgcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_path__PGC_" && ac_cv_path__PGC_="false" - ;; -esac fi -_PGC_=$ac_cv_path__PGC_ - +fi +_PGC_=$ac_cv_prog__PGC_ if test -n "$_PGC_"; then echo "$as_me:$LINENO: result: $_PGC_" >&5 echo "${ECHO_T}$_PGC_" >&6 @@ -1955,38 +1949,33 @@ else echo "${ECHO_T}no" >&6 fi -# Extract the first word of "pgcc", so it can be a program name with args. -set dummy pgcc; ac_word=$2 +# Extract the first word of "pgCC", so it can be a program name with args. +set dummy pgCC; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path__PGCXX_+set}" = set; then +if test "${ac_cv_prog__PGCXX_+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $_PGCXX_ in - [\\/]* | ?:[\\/]*) - ac_cv_path__PGCXX_="$_PGCXX_" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$_PGCXX_"; then + ac_cv_prog__PGCXX_="$_PGCXX_" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path__PGCXX_="$as_dir/$ac_word$ac_exec_ext" + ac_cv_prog__PGCXX_="pgCC" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done - test -z "$ac_cv_path__PGCXX_" && ac_cv_path__PGCXX_="false" - ;; -esac fi -_PGCXX_=$ac_cv_path__PGCXX_ - +fi +_PGCXX_=$ac_cv_prog__PGCXX_ if test -n "$_PGCXX_"; then echo "$as_me:$LINENO: result: $_PGCXX_" >&5 echo "${ECHO_T}$_PGCXX_" >&6 @@ -2021,7 +2010,6 @@ do done done - test -z "$ac_cv_path__CC_" && ac_cv_path__CC_="false" ;; esac fi @@ -2061,7 +2049,6 @@ do done done - test -z "$ac_cv_path__CXX_" && ac_cv_path__CXX_="false" ;; esac fi @@ -4024,7 +4011,6 @@ echo "$as_me:$LINENO: checking for -fno-stack-protector" >&5 echo $ECHO_N "checking for -fno-stack-protector... $ECHO_C" >&6 SAVED_CXXFLAGS=$CXXFLAGS CXXFLAGS="-fno-stack-protector" - cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF diff --git a/configure.in b/configure.in index 0248ac1..3b32a36 100644 --- a/configure.in +++ b/configure.in @@ -10,11 +10,11 @@ AC_CONFIG_AUX_DIR([autodyninst]) AC_CONFIG_MACRO_DIR([autodyninst]) AC_PROG_CXX(g++) -AC_PATH_PROG(_ICC_, icc, false) -AC_PATH_PROG(_PGC_, pgcc, false) -AC_PATH_PROG(_PGCXX_, pgcc, false) -AC_PATH_PROG(_CC_, cc, false) -AC_PATH_PROG(_CXX_, CC, false) +AC_PATH_PROG(_ICC_, icc) +AC_PATH_PROG(_PGC_, pgcc) +AC_PATH_PROG(_PGCXX_, pgCC) +AC_PATH_PROG(_CC_, cc) +AC_PATH_PROG(_CXX_, CC) AC_LANG(C++) @@ -179,8 +179,7 @@ AC_SUBST(NASM) AC_MSG_CHECKING([for -fno-stack-protector]) SAVED_CXXFLAGS=$CXXFLAGS -CXXFLAGS="-fno-stack-protector" AC_SUBST(LIBIBERTY_STATIC) - +CXXFLAGS="-fno-stack-protector" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [AC_MSG_RESULT([yes]); STACKPROT="DISABLE_STACK_PROT=1"], [AC_MSG_RESULT([no]); STACKPROT=""]) diff --git a/make.config b/make.config index e45849e..dc8cdd5 100644 --- a/make.config +++ b/make.config @@ -80,9 +80,9 @@ endif # Destinations for library and executable installation (relative to core!) # Warning: modification of the build/install structure is not recommended! -#LIBRARY_DEST = ../${PLATFORM}/lib -#PROGRAM_DEST = ../${PLATFORM}/bin -#INCLUDE_DEST = ../include +LIBRARY_DEST ?= ../${PLATFORM}/lib +PROGRAM_DEST ?= ../${PLATFORM}/bin +INCLUDE_DEST ?= ../include # Usually, we look for files, binaries, libs in $(TO_CORE)/..... # But if the file doesn't exist there (i.e. if the user hasn't checked them out -- 1.8.3.1