From 3f7da74b025a28323ea7efe4ec72c027e49d2a6c Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 27 Aug 2006 07:08:46 +0000 Subject: [PATCH] Check for redundant -I's. --- aclocal.m4 | 19 +++++-------------- configure | 21 +++++++-------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index c8dce46f..4d7caf53 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -84,18 +84,7 @@ done if test "x$mh_x11_dir" != "x" ; then mh_x11_dir_no_x11=`echo $mh_x11_dir | sed 's/\/X11$//'` -dnl Test to see if $mh_x11_dir_no_x11 is /usr/include and we are using gcc -dnl under Solaris. If so, ignore it. - AC_REQUIRE([AC_CANONICAL_SYSTEM]) - mh_solaris_gcc_usr_include="no" - case "$target" in - *solaris*) - if test "$ac_cv_prog_CC" = "gcc" -a "$mh_x11_dir_no_x11" = "/usr/include" ; then - mh_solaris_gcc_usr_include="yes" - fi - ;; - esac - if test "$mh_x11_dir_no_x11" != "$mh_x11_dir" -a "$mh_solaris_gcc_usr_include" = "no" ; then + if test "$mh_x11_dir_no_x11" != "$mh_x11_dir" ; then MH_XINC_DIR="-I$mh_x11_dir -I$mh_x11_dir_no_x11" else MH_XINC_DIR="-I$mh_x11_dir" @@ -104,8 +93,10 @@ else AC_MSG_ERROR(Cannot find required header file Intrinsic.h; PDCurses cannot be configured) fi -if test "x$mh_x11_xaw_dir" != "x" ; then - MH_XINC_DIR="-I$mh_x11_xaw_dir $MH_XINC_DIR" +if test "x$mh_x11_xaw_dir" != "x"; then + if test "$mh_x11_xaw_dir" != "$mh_x11_dir" ; then + MH_XINC_DIR="-I$mh_x11_xaw_dir $MH_XINC_DIR" + fi else AC_MSG_ERROR(Cannot find required Xaw header file Box.h; PDCurses cannot be configured) fi diff --git a/configure b/configure index 1f6eefe7..e8d618bb 100755 --- a/configure +++ b/configure @@ -4125,16 +4125,7 @@ done if test "x$mh_x11_dir" != "x" ; then mh_x11_dir_no_x11=`echo $mh_x11_dir | sed 's/\/X11$//'` - - mh_solaris_gcc_usr_include="no" - case "$target" in - *solaris*) - if test "$ac_cv_prog_CC" = "gcc" -a "$mh_x11_dir_no_x11" = "/usr/include" ; then - mh_solaris_gcc_usr_include="yes" - fi - ;; - esac - if test "$mh_x11_dir_no_x11" != "$mh_x11_dir" -a "$mh_solaris_gcc_usr_include" = "no" ; then + if test "$mh_x11_dir_no_x11" != "$mh_x11_dir" ; then MH_XINC_DIR="-I$mh_x11_dir -I$mh_x11_dir_no_x11" else MH_XINC_DIR="-I$mh_x11_dir" @@ -4145,8 +4136,10 @@ echo "$as_me: error: Cannot find required header file Intrinsic.h; PDCurses cann { (exit 1); exit 1; }; } fi -if test "x$mh_x11_xaw_dir" != "x" ; then - MH_XINC_DIR="-I$mh_x11_xaw_dir $MH_XINC_DIR" +if test "x$mh_x11_xaw_dir" != "x"; then + if test "$mh_x11_xaw_dir" != "$mh_x11_dir" ; then + MH_XINC_DIR="-I$mh_x11_xaw_dir $MH_XINC_DIR" + fi else { { echo "$as_me:$LINENO: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured" >&5 echo "$as_me: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured" >&2;} @@ -4833,7 +4826,7 @@ echo "$as_me:$LINENO: checking compiler flags for a dynamic object" >&5 echo $ECHO_N "checking compiler flags for a dynamic object... $ECHO_C" >&6 cat > conftest.$ac_ext <&6 mh_compile='${CC-cc} -c $DYN_COMP conftest.$ac_ext 1>&5' cat > conftest.$ac_ext <