To: vim-dev@vim.org Subject: Patch 7.2a.001 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.2a.001 Problem: On some systems X11/Xlib.h exists (from X11-dev package) but X11/Intrinsic.h does not (in Xt-dev package). This breaks the build. Also, on Solaris 9 sys/ptem.h isn't found. Solution: Have configure only accept X11 when X11/Intrinsic.h exists. Check for sys/ptem.h while including sys/stream.h. (Vladimir Marek) Files: src/auto/configure, src/configure.in *** ../vim-7.2a.000/src/auto/configure Tue Jun 24 23:41:27 2008 --- src/auto/configure Thu Jun 26 21:31:24 2008 *************** *** 7565,7571 **** X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`" ! { $as_echo "$as_me:$LINENO: checking if X11 header files can be found" >&5 $as_echo_n "checking if X11 header files can be found... " >&6; } cflags_save=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" --- 7565,7571 ---- X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`" ! { $as_echo "$as_me:$LINENO: checking if X11 header files can be found" >&5 $as_echo_n "checking if X11 header files can be found... " >&6; } cflags_save=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" *************** *** 7576,7581 **** --- 7576,7582 ---- cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include + #include int main () { *************** *** 10883,10894 **** - for ac_header in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \ iconv.h langinfo.h math.h unistd.h stropts.h errno.h \ sys/resource.h sys/systeminfo.h locale.h \ ! sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ libgen.h util/debug.h util/msg18n.h frame.h \ sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h wctype.h --- 10884,10894 ---- for ac_header in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \ termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \ iconv.h langinfo.h math.h unistd.h stropts.h errno.h \ sys/resource.h sys/systeminfo.h locale.h \ ! sys/stream.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ libgen.h util/debug.h util/msg18n.h frame.h \ sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h wctype.h *************** *** 11036,11041 **** --- 11036,11106 ---- done + + for ac_header in sys/ptem.h + do + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 + $as_echo_n "checking for $ac_header... " >&6; } + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #if defined HAVE_SYS_STREAM_H + # include + #endif + + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" + $as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" + else + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + if test `eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + + + { $as_echo "$as_me:$LINENO: checking for pthread_np.h" >&5 $as_echo_n "checking for pthread_np.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF *** ../vim-7.2a.000/src/configure.in Tue Jun 24 23:48:47 2008 --- src/configure.in Thu Jun 26 21:31:19 2008 *************** *** 1120,1130 **** dnl Check if the X11 header files are correctly installed. On some systems ! dnl Xlib.h includes files that don't exist AC_MSG_CHECKING(if X11 header files can be found) cflags_save=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" ! AC_TRY_COMPILE([#include ], , AC_MSG_RESULT(yes), AC_MSG_RESULT(no); no_x=yes) CFLAGS=$cflags_save --- 1120,1132 ---- dnl Check if the X11 header files are correctly installed. On some systems ! dnl Xlib.h includes files that don't exist. On some systems X11/Intrinsic.h ! dnl is missing. AC_MSG_CHECKING(if X11 header files can be found) cflags_save=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" ! AC_TRY_COMPILE([#include ! #include ], , AC_MSG_RESULT(yes), AC_MSG_RESULT(no); no_x=yes) CFLAGS=$cflags_save *************** *** 2071,2081 **** termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \ iconv.h langinfo.h math.h unistd.h stropts.h errno.h \ sys/resource.h sys/systeminfo.h locale.h \ ! sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ libgen.h util/debug.h util/msg18n.h frame.h \ sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h wctype.h) dnl pthread_np.h may exist but can only be used after including pthread.h AC_MSG_CHECKING([for pthread_np.h]) AC_TRY_COMPILE([ --- 2073,2090 ---- termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h sys/types.h termio.h \ iconv.h langinfo.h math.h unistd.h stropts.h errno.h \ sys/resource.h sys/systeminfo.h locale.h \ ! sys/stream.h termios.h libc.h sys/statfs.h \ poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \ libgen.h util/debug.h util/msg18n.h frame.h \ sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h wctype.h) + dnl sys/ptem.h depends on sys/stream.h on Solaris + AC_CHECK_HEADERS(sys/ptem.h, [], [], + [#if defined HAVE_SYS_STREAM_H + # include + #endif]) + + dnl pthread_np.h may exist but can only be used after including pthread.h AC_MSG_CHECKING([for pthread_np.h]) AC_TRY_COMPILE([ *** ../vim-7.2a.000/src/version.c Tue Jun 24 23:51:48 2008 --- src/version.c Thu Jun 26 22:08:32 2008 *************** *** 678,679 **** --- 678,681 ---- { /* Add new patch number below this line */ + /**/ + 1, /**/ -- I AM THANKFUL... ...for a lawn that needs mowing, windows that need cleaning and gutters that need fixing because it means I have a home. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///