1
1

Really fix the libevent make distcheck problem. The main issue is how

libevent creates its event-config.h during "make all" (vs. during
configure).  The prior method around this didn't work because it wrote
an event-config.h.in in the source tree -- a Bad Idea(tm).  The new
way uses AC_CONFIG_COMMAND to get stuff executed at the end of
config.status to create event-config.h.  This seems to work properly
during make distcheck.

This commit was SVN r23975.
Этот коммит содержится в:
Jeff Squyres 2010-11-01 23:28:50 +00:00
родитель c23b26a66f
Коммит 9c15a30b75
2 изменённых файлов: 21 добавлений и 13 удалений

Просмотреть файл

@ -45,7 +45,6 @@ headers += libevent/event.h libevent/evutil.h libevent/util-internal.h \
libevent/include/event2/dns_struct.h \
libevent/include/event2/event_compat.h \
libevent/include/event2/event_struct.h \
libevent/include/event2/event-config.h \
libevent/include/event2/event.h \
libevent/include/event2/http_compat.h \
libevent/include/event2/http_struct.h \
@ -61,6 +60,8 @@ headers += libevent/event.h libevent/evutil.h libevent/util-internal.h \
libevent/include/event2/util.h
opaldir = $(includedir)/openmpi/$(subdir)
nobase_opal_HEADERS = $(headers)
nobase_nodist_opal_HEADERS = libevent/include/event2/event-config.h
endif
# Make the output library in this directory, and name it either

Просмотреть файл

@ -127,13 +127,11 @@ AC_DEFUN([MCA_opal_event_libevent207_CONFIG],[
# other things are built before the event framework that
# end up including event-config.h). The steps below were
# copied from libevent's Makefile.am.
file="$basedir/libevent/include/event2/event-config.h"
mkdir -p "`dirname $OMPI_TOP_SRCDIR/$file`"
AS_IF([test ! -d "`dirname $OMPI_TOP_SRCDIR/$file`"],
[AC_MSG_WARN([Failed to mkdir `dirname $file`])
AC_MSG_ERROR([Cannot continue])])
cat > "$OMPI_TOP_SRCDIR/$file.in" <<EOF
AC_CONFIG_COMMANDS([opal/mca/event/libevent207/libevent/include/event2/event-config.h],
[basedir="opal/mca/event/libevent207"
file="$basedir/libevent/include/event2/event-config.h"
rm -f "$file.new"
cat > "$file.new" <<EOF
/* event2/event-config.h
*
* This file was generated by autoconf when libevent was built, and
@ -149,11 +147,20 @@ AC_DEFUN([MCA_opal_event_libevent207_CONFIG],[
#define _EVENT2_EVENT_CONFIG_H_
EOF
sed -e 's/#define /#define _EVENT_/' \
-e 's/#undef /#undef _EVENT_/' \
-e 's/#ifndef /#ifndef _EVENT_/' < "$OMPI_TOP_BUILDDIR/$basedir/libevent/config.h" >> "$OMPI_TOP_SRCDIR/$file.in"
echo "#endif" >> "$OMPI_TOP_SRCDIR/$file.in"
AC_CONFIG_FILES([$file])
sed -e 's/#define /#define _EVENT_/' \
-e 's/#undef /#undef _EVENT_/' \
-e 's/#ifndef /#ifndef _EVENT_/' < "$basedir/libevent/config.h" >> "$file.new"
echo "#endif" >> "$file.new"
# Only make a new .h file if the
# contents haven't changed
diff -q $file "$file.new" > /dev/null 2> /dev/null
if test "$?" = "0"; then
echo $file is unchanged
else
cp "$file.new" $file
rm -f "$file.new"
fi])
# Must set this variable so that the framework m4 knows
# what file to include in opal/mca/event/event.h