You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
3.0 KiB

  1. From 8c2b4061d16756ee2ed37f08db063b8215656943 Mon Sep 17 00:00:00 2001
  2. From: Hongxu Jia <hongxu.jia@windriver.com>
  3. Date: Thu, 2 Nov 2017 16:48:15 +0800
  4. Subject: [PATCH] fix configure failed while build dir name contains "yes"
  5. While build dir name contained "yes", and compiled with
  6. producing debugging information (-g), the configure failed.
  7. The pattern of AC_EGREP_CPP (string "yes") mismatched with
  8. dir name. It caused the test of AC_EGREP_CPP incorrect.
  9. Use YES_IS_DEFINED to replace yes which is not often used
  10. as dir name.
  11. Bug: 52329
  12. (Fix release v.4.6.2 or above)
  13. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
  14. ---
  15. configure.ac | 32 ++++++++++++++++----------------
  16. 1 file changed, 16 insertions(+), 16 deletions(-)
  17. diff --git a/src/configure.ac b/src/configure.ac
  18. index 28237f5..34f9735 100644
  19. --- a/configure.ac
  20. +++ b/configure.ac
  21. @@ -151,9 +151,9 @@ fi
  22. AC_CHECKING(for Ultrix)
  23. -AC_EGREP_CPP(yes,
  24. +AC_EGREP_CPP(YES_IS_DEFINED,
  25. [#if defined(ultrix) || defined(__ultrix)
  26. - yes;
  27. + YES_IS_DEFINED;
  28. #endif
  29. ], ULTRIX=1)
  30. @@ -168,9 +168,9 @@ dnl ghazi@caip.rutgers.edu (Kaveh R. Ghazi):
  31. dnl BBN butterfly is not POSIX, but a MACH BSD system.
  32. dnl Do not define POSIX and TERMIO.
  33. AC_CHECKING(for butterfly)
  34. -AC_EGREP_CPP(yes,
  35. +AC_EGREP_CPP(YES_IS_DEFINED,
  36. [#if defined(butterfly)
  37. - yes;
  38. + YES_IS_DEFINED;
  39. #endif
  40. ], butterfly=1)
  41. @@ -179,12 +179,12 @@ if test -n "$ULTRIX"; then
  42. test -z "$GCC" && CC="$CC -YBSD"
  43. fi
  44. AC_CHECKING(for POSIX.1)
  45. -AC_EGREP_CPP(yes,
  46. +AC_EGREP_CPP(YES_IS_DEFINED,
  47. [#include <sys/types.h>
  48. #include <unistd.h>
  49. main () {
  50. #ifdef _POSIX_VERSION
  51. - yes;
  52. + YES_IS_DEFINED;
  53. #endif
  54. ], AC_NOTE(- you have a POSIX system) AC_DEFINE(POSIX) posix=1)
  55. fi
  56. @@ -196,9 +196,9 @@ AC_TRY_COMPILE(
  57. #include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV))
  58. AC_CHECKING(for sequent/ptx)
  59. -AC_EGREP_CPP(yes,
  60. +AC_EGREP_CPP(YES_IS_DEFINED,
  61. [#ifdef _SEQUENT_
  62. - yes;
  63. + YES_IS_DEFINED;
  64. #endif
  65. ], LIBS="$LIBS -lsocket -linet";seqptx=1)
  66. @@ -213,9 +213,9 @@ AC_TRY_LINK([#include <utmpx.h>
  67. AC_CHECK_HEADERS([stropts.h string.h strings.h])
  68. AC_CHECKING(for Solaris 2.x)
  69. -AC_EGREP_CPP(yes,
  70. +AC_EGREP_CPP(YES_IS_DEFINED,
  71. [#if defined(SVR4) && defined(sun)
  72. - yes
  73. + YES_IS_DEFINED;
  74. #endif
  75. ], LIBS="$LIBS -lsocket -lnsl -lkstat")
  76. @@ -699,9 +699,9 @@ else
  77. pdir='/dev'
  78. fi
  79. dnl SCO uses ptyp%d
  80. -AC_EGREP_CPP(yes,
  81. +AC_EGREP_CPP(YES_IS_DEFINED,
  82. [#ifdef M_UNIX
  83. - yes;
  84. + YES_IS_DEFINED;
  85. #endif
  86. ], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
  87. dnl if test -c /dev/ptyp19; then
  88. @@ -878,9 +878,9 @@ fi
  89. )
  90. if test -z "$load" ; then
  91. -AC_EGREP_CPP(yes,
  92. +AC_EGREP_CPP(YES_IS_DEFINED,
  93. [#if defined(NeXT) || defined(apollo) || defined(linux)
  94. - yes;
  95. + YES_IS_DEFINED;
  96. #endif
  97. ], load=1)
  98. fi
  99. @@ -1105,9 +1105,9 @@ AC_CHECKING(syslog in libbsd.a)
  100. AC_TRY_LINK(, [closelog();], AC_NOTE(- found.), [LIBS="$oldlibs"
  101. AC_NOTE(- bad news: syslog missing.) AC_DEFINE(NOSYSLOG)])])
  102. -AC_EGREP_CPP(yes,
  103. +AC_EGREP_CPP(YES_IS_DEFINED,
  104. [#ifdef M_UNIX
  105. - yes;
  106. + YES_IS_DEFINED;
  107. #endif
  108. ], LIBS="$LIBS -lsocket -lcrypt_i")
  109. --
  110. 2.17.1