Freebsd build changes

This commit is contained in:
tstack 2009-12-24 10:36:01 -08:00
parent 198005a58c
commit c07ba8756f
14 changed files with 126 additions and 56 deletions

124
configure vendored
View File

@ -727,8 +727,6 @@ SQLITE3_CFLAGS
SQLITE3_LDFLAGS
SQLITE3_LIBS
SQLITE3_VERSION
HAVE_LIBSQLITE3_TRUE
HAVE_LIBSQLITE3_FALSE
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@ -2350,6 +2348,9 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
case x$srcdir in
x/*)
abssrcdir=$srcdir
@ -5787,7 +5788,7 @@ return gzseek ();
return 0;
}
_ACEOF
for ac_lib in '' libz; do
for ac_lib in '' z; do
if test -z "$ac_lib"; then
ac_res="none required"
else
@ -5840,12 +5841,100 @@ ac_res=$ac_cv_search_gzseek
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
{ { echo "$as_me:$LINENO: error: libz required to build" >&5
echo "$as_me: error: libz required to build" >&2;}
{ (exit 1); exit 1; }; }
fi
{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5
echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
if test "${ac_cv_search_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_func_search_save_LIBS=$LIBS
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
;
return 0;
}
_ACEOF
for ac_lib in '' dl; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_search_dlopen=$ac_res
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext
if test "${ac_cv_search_dlopen+set}" = set; then
break
fi
done
if test "${ac_cv_search_dlopen+set}" = set; then
:
else
ac_cv_search_dlopen=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
ac_res=$ac_cv_search_dlopen
if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
for ac_header in pty.h util.h zlib.h
for ac_header in pty.h util.h zlib.h libutil.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@ -6918,16 +7007,6 @@ _ACEOF
if
test -n "$SQLITE3_CFLAGS" -a -n "$SQLITE3_LDFLAGS"; then
HAVE_LIBSQLITE3_TRUE=
HAVE_LIBSQLITE3_FALSE='#'
else
HAVE_LIBSQLITE3_TRUE='#'
HAVE_LIBSQLITE3_FALSE=
fi
case "$host_os" in
darwin*)
@ -6937,11 +7016,7 @@ _ACEOF
;;
*)
cat >>confdefs.h <<\_ACEOF
#define _XOPEN_SOURCE 500
_ACEOF
# AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread])
cat >>confdefs.h <<\_ACEOF
#define _BSD_SOURCE
@ -7092,13 +7167,6 @@ echo "$as_me: error: conditional \"HAVE_OBJ_FORMAT\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${HAVE_LIBSQLITE3_TRUE}" && test -z "${HAVE_LIBSQLITE3_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBSQLITE3\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"HAVE_LIBSQLITE3\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@ -7786,13 +7854,11 @@ SQLITE3_CFLAGS!$SQLITE3_CFLAGS$ac_delim
SQLITE3_LDFLAGS!$SQLITE3_LDFLAGS$ac_delim
SQLITE3_LIBS!$SQLITE3_LIBS$ac_delim
SQLITE3_VERSION!$SQLITE3_VERSION$ac_delim
HAVE_LIBSQLITE3_TRUE!$HAVE_LIBSQLITE3_TRUE$ac_delim
HAVE_LIBSQLITE3_FALSE!$HAVE_LIBSQLITE3_FALSE$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -7,6 +7,9 @@ AC_PREFIX_DEFAULT(/usr/)
AC_CANONICAL_HOST
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
dnl abssrcdir is the absolute path to the source base (regardless of where
dnl you are building it)
case x$srcdir in
@ -63,8 +66,9 @@ AM_CONDITIONAL(HAVE_OBJ_FORMAT, test x"$OBJ_FORMAT" != x"" -a x"$OBJCOPY" != x""
AC_SUBST(OBJ_FORMAT)
AC_SEARCH_LIBS(openpty, util)
AC_SEARCH_LIBS(gzseek, libz)
AC_CHECK_HEADERS(pty.h util.h zlib.h)
AC_SEARCH_LIBS(gzseek, z, [], [AC_MSG_ERROR([libz required to build])])
AC_SEARCH_LIBS(dlopen, dl)
AC_CHECK_HEADERS(pty.h util.h zlib.h libutil.h)
MP_WITH_CURSES()
AX_PATH_LIB_PCRE([], [AC_MSG_ERROR([pcre required to build])])
@ -72,15 +76,12 @@ AX_PATH_LIB_READLINE([], [AC_MSG_ERROR([readline required to build])])
AX_LIB_SQLITE3("3.0.0")
AM_CONDITIONAL(HAVE_LIBSQLITE3, [
test -n "$SQLITE3_CFLAGS" -a -n "$SQLITE3_LDFLAGS"])
case "$host_os" in
darwin*)
AC_DEFINE([_APPLE_C_SOURCE], [], [Needed for the 'timezone' variable])
;;
*)
AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread])
# AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread])
AC_DEFINE([_BSD_SOURCE], [], [Need pread])
;;
esac

View File

@ -29,7 +29,6 @@ AM_LDFLAGS = \
AM_CPPFLAGS = \
-Wall \
-Werror \
$(SQLITE3_CFLAGS)
LDADD = \
@ -37,9 +36,7 @@ LDADD = \
$(READLINE_LIBS) \
$(CURSES_LIB) \
$(HELP_O) \
/usr/lib/libsqlite3.a \
-ldl \
-lz \
$(SQLITE3_LIBS) \
-lpcrecpp
noinst_HEADERS = \

View File

@ -72,7 +72,7 @@ am__DEPENDENCIES_1 =
@HAVE_OBJ_FORMAT_TRUE@am__DEPENDENCIES_2 = help.o
lnav_DEPENDENCIES = libdiag.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
/usr/lib/libsqlite3.a
$(am__DEPENDENCIES_1)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@ -210,7 +210,6 @@ AM_LDFLAGS = \
AM_CPPFLAGS = \
-Wall \
-Werror \
$(SQLITE3_CFLAGS)
LDADD = \
@ -218,9 +217,7 @@ LDADD = \
$(READLINE_LIBS) \
$(CURSES_LIB) \
$(HELP_O) \
/usr/lib/libsqlite3.a \
-ldl \
-lz \
$(SQLITE3_LIBS) \
-lpcrecpp
noinst_HEADERS = \

View File

@ -50,7 +50,7 @@ public:
: af_fd(fd)
{
assert(fd >= -1);
assert(fd < FD_SETSIZE);
assert(fd < (int)FD_SETSIZE);
};
/**
@ -95,7 +95,7 @@ public:
auto_fd &operator=(int fd)
{
assert(fd >= -1);
assert(fd < FD_SETSIZE);
assert(fd < (int)FD_SETSIZE);
this->reset(fd);
return(*this);
@ -152,7 +152,7 @@ public:
void reset(int fd = -1)
{
assert(fd >= -1);
assert(fd < FD_SETSIZE);
assert(fd < (int)FD_SETSIZE);
if (this->af_fd != fd) {
if (this->af_fd != -1) {

View File

@ -12,6 +12,9 @@
/* Define to 1 if you have the `readline' library (-lreadline). */
#undef HAVE_LIBREADLINE
/* Define to 1 if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@ -98,6 +101,3 @@
/* Need pread */
#undef _BSD_SOURCE
/* Need pread */
#undef _XOPEN_SOURCE

View File

@ -144,7 +144,7 @@ class tcsh_history_format : public log_format {
log_tm.tm_isdst = 0;
dst.push_back(logline(offset,
mktime(&log_tm) - timezone,
mktime(&log_tm) /* - timezone XXX */,
0,
logline::LEVEL_UNKNOWN));

View File

@ -22,6 +22,10 @@
#include <util.h>
#endif
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
#endif
#include <string>
#include "auto_mem.hh"

View File

@ -13,6 +13,7 @@
#include <sys/ioctl.h>
#include <termios.h>
#include <ncurses.h>
#include <signal.h>
#ifdef HAVE_PTY_H
#include <pty.h>
@ -22,6 +23,10 @@
#include <util.h>
#endif
#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
#endif
#include <queue>
#include <algorithm>

View File

@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
cat > gp.dat <<EOF
Hello, World!

View File

@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
run_test ./drive_line_buffer ${top_srcdir}/src/line_buffer.hh

View File

@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
run_test ./scripty -n -e ${srcdir}/listview_output.0 -- \
./drive_listview < /dev/null

View File

@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
run_test ./drive_logfile -f syslog_log ${srcdir}/logfile_syslog.0

View File

@ -1,4 +1,4 @@
#! /bin/sh
#! /bin/bash
run_test ./scripty -n -r ${srcdir}/vt52_curses_input.0 \
-e ${srcdir}/vt52_curses_output.0 -- ./drive_vt52_curses < /dev/null