Commit 1ffff55f authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi

Another attempt to get pstack into the binary distribution

Fixed that --enable-assembler works on newer Linux system
parent 6c314240
......@@ -22,7 +22,7 @@ TAR = gtar
EXTRA_DIST = INSTALL-SOURCE README \
COPYING COPYING.LIB MIRRORS
SUBDIRS = include @docs_dirs@ @readline_dir@ \
@thread_dirs@ @pstack_dirs@ @sql_client_dirs@ \
@thread_dirs@ pstack @sql_client_dirs@ \
@sql_server_dirs@ @libmysqld_dirs@ scripts tests man \
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
......
......@@ -65,6 +65,12 @@ AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE")
AC_SUBST(MACHINE_TYPE)
AC_DEFINE_UNQUOTED(MACHINE_TYPE, "$MACHINE_TYPE")
# Detect intel x86 like processor
BASE_MACHINE_TYPE=$MACHINE_TYPE
case $MACHINE_TYPE in
i?86) BASE_MACHINE_TYPE=i386 ;;
esac
# Save some variables and the command line options for mysqlbug
SAVE_CFLAGS="$CFLAGS"
SAVE_CXXFLAGS="$CXXFLAGS"
......@@ -515,12 +521,22 @@ AC_ARG_ENABLE(assembler,
[ ENABLE_ASSEMBLER=$enableval ],
[ ENABLE_ASSEMBLER=no ]
)
AC_MSG_CHECKING(if we should use assembler functions)
# For now we only support assembler on i386 and sparc systems
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$MACHINE_TYPE" = "i386")
AM_CONDITIONAL(ASSEMBLER_sparc, test "$ENABLE_ASSEMBLER" = "yes" -a "$MACHINE_TYPE" = "sparc")
AM_CONDITIONAL(ASSEMBLER, test ASSEMBLER_x86 = "" -o ASSEMBLER_x86 = "")
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386")
AM_CONDITIONAL(ASSEMBLER_sparc, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc_TRUE" = "")
AC_MSG_CHECKING(whether to use RAID)
if test "$ASSEMBLER_TRUE" = ""
then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_MSG_CHECKING(if we should use RAID)
AC_ARG_WITH(raid,
[ --with-raid Enable RAID Support],
[ USE_RAID=$withval ],
......@@ -688,7 +704,7 @@ int main()
[USE_PSTACK=yes])
pstack_libs=
pstack_dirs=
if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$MACHINE_TYPE" = "i686" -a "$with_mit_threads" = "no"
if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no"
then
have_libiberty= have_libbfd=
my_save_LIBS="$LIBS"
......@@ -698,7 +714,6 @@ dnl I have no idea if this is a good test - can not find docs for libiberty
AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])])
LIBS="$my_save_LIBS"
AC_MSG_CHECKING([for pstack libs])
if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes
then
pstack_dirs='$(top_srcdir)'/pstack
......@@ -706,16 +721,20 @@ dnl I have no idea if this is a good test - can not find docs for libiberty
AC_SUBST([pstack_dirs])
AC_SUBST([pstack_libs])
AC_DEFINE([USE_PSTACK])
AC_MSG_RESULT([yes])
dnl This check isn't needed, but might be nice to give some feedback....
dnl AC_CHECK_HEADER(libiberty.h,
dnl have_libiberty_h=yes,
dnl have_libiberty_h=no)
else
AC_MSG_RESULT([no (missing libbfd)])
USE_PSTACK="no"
fi
else
USE_PSTACK="no"
fi
fi
AM_CONDITIONAL(COMPILE_PSTACK, test "$USE_PSTACK" = "yes")
AC_MSG_CHECKING([if we should use pstack])
AC_MSG_RESULT([$USE_PSTACK])
# Check for gtty if termio.h doesn't exists
if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
......
......@@ -14,12 +14,22 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# As pstack doesn't work on all configurations, we have to use
# the USE_PSTACK hack to get all files into distribution
#
INCLUDES = -I$(srcdir)/../include -I../include
pkglib_LIBRARIES = libpstack.a
noinst_HEADERS = bucomm.h debug.h ieee.h budbg.h demangle.h \
linuxthreads.h pstack.h pstacktrace.h
libpstack_a_SOURCES = bucomm.c filemode.c linuxthreads.c rddbg.c \
SRC= bucomm.c filemode.c linuxthreads.c rddbg.c \
debug.c ieee.c pstack.c stabs.c
EXTRA_DIST= $SRC
if COMPILE_PSTACK
pkglib_LIBRARIES = libpstack.a
libpstack_a_SOURCES = bucomm.c filemode.c linuxthreads.c rddbg.c debug.c ieee.c pstack.c stabs.c
endif
# Don't update the files from bitkeeper
%::SCCS/s.%
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment