From 630dcb0835e8ddd8be0cd905cde9a10cc05aa81d Mon Sep 17 00:00:00 2001 From: Eric J Korpela Date: Thu, 1 Nov 2012 17:58:57 -0700 Subject: [PATCH] - First fixes for out-of-source-tree configure and compile - samples/example_app will no longer build by default. To build person compile must run make in the example_app directory in-source-tree. Thats because the Makefile is not and should not be generated by automake. --- Makefile.am | 3 ++- Makefile.incl | 1 + m4/sah_header_stdcxx.m4 | 2 +- m4/sah_largefile_breaks_cxx.m4 | 2 +- m4/sah_links.m4 | 8 ++++---- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index f74a3637e9..3c0e9583e8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,8 @@ if ENABLE_LIBRARIES endif if ENABLE_SERVER - SERVER_SUBDIRS = db test py sched apps tools samples/example_app vda + SERVER_SUBDIRS = db test py sched apps tools vda +## once contained samples/example_app which breaks out-of-source-tree builds endif if ENABLE_CLIENT diff --git a/Makefile.incl b/Makefile.incl index 537a0f95ba..aae95fbdcd 100644 --- a/Makefile.incl +++ b/Makefile.incl @@ -18,6 +18,7 @@ RSA_LIBS = -lcrypto AM_LIBTOOLFLAGS = AM_CPPFLAGS = \ + -I$(top_srcdir) \ -I$(top_srcdir)/api \ -I$(top_srcdir)/db \ -I$(top_srcdir)/lib \ diff --git a/m4/sah_header_stdcxx.m4 b/m4/sah_header_stdcxx.m4 index 5ee09041c7..934204cf14 100644 --- a/m4/sah_header_stdcxx.m4 +++ b/m4/sah_header_stdcxx.m4 @@ -24,7 +24,7 @@ AC_DEFUN([SAH_HEADER_STDCXX],[ save_inc="$ac_includes_default" ac_includes_default=" #define CONFIG_TEST -#include \"lib/std_fixes.h\" +#include \"${ac_aux_dir}/lib/std_fixes.h\" $ac_includes_default " diff --git a/m4/sah_largefile_breaks_cxx.m4 b/m4/sah_largefile_breaks_cxx.m4 index 15b95cf9a0..bf1f6c8198 100644 --- a/m4/sah_largefile_breaks_cxx.m4 +++ b/m4/sah_largefile_breaks_cxx.m4 @@ -18,7 +18,7 @@ AC_DEFUN([SAH_LARGEFILE_BREAKS_CXX],[ [AC_DEFINE([LARGEFILE_BREAKS_CXX],[1], ["Define to 1 if largefile support causes missing symbols in C++"] ) tmp_res="yes" - sah_cxx_includes=`echo "#include \"$TOP_BUILD_DIR/lib/std_fixes.h\"" ; echo $sah_cxx_includes` + sah_cxx_includes=`echo "#include \"${ac_aux_dir}/lib/std_fixes.h\"" ; echo $sah_cxx_includes` ] ) AC_MSG_RESULT($tmp_res) diff --git a/m4/sah_links.m4 b/m4/sah_links.m4 index 492282ddbf..5c29dc4dd1 100644 --- a/m4/sah_links.m4 +++ b/m4/sah_links.m4 @@ -2,9 +2,9 @@ AC_DEFUN([SAH_LINKS],[ AC_PATH_PROGS(LN,[ln cp copy]) if test -n "$LN" ; then AC_MSG_CHECKING(whether '$LN' works) - if $LN config.sub erase.me$$ && \ + if $LN ${ac_aux_dir}/config.sub erase.me$$ && \ test -e erase.me$$ && \ - diff config.sub erase.me$$ >/dev/null 2>&5 + diff ${ac_aux_dir}/config.sub erase.me$$ >/dev/null 2>&5 then AC_MSG_RESULT(yes) else @@ -18,9 +18,9 @@ AC_DEFUN([SAH_LINKS],[ AC_PROG_LN_S if test -n "$LN_S" ; then AC_MSG_CHECKING(whether '$LN_S' really works or whether I'm deluding myself) - if $LN_S config.sub erase.me$$ && \ + if $LN_S ${ac_aux_dir}/config.sub erase.me$$ && \ test -e erase.me$$ && \ - diff config.sub erase.me$$ >/dev/null 2>&5 + diff ${ac_aux_dir}/config.sub erase.me$$ >/dev/null 2>&5 then AC_MSG_RESULT(it works) else