fixed some cross-compiling problems in build files

- specifying $(includedir) to AM_CPPFLAGS caused problems when --prefix was set to /usr during cross-compliation since header files for the cross compiler conflicted with files in $(includedir)=/usr/include. 
- the same applies to $(libdir) in LDFLAGS or something similar
This commit is contained in:
hyung-hwan 2013-02-26 18:31:38 +00:00
parent b4e1c58553
commit a426fe24f4
22 changed files with 85 additions and 89 deletions

View File

@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir) $(LTDLINCL)
$(LTDLINCL)
if WIN32
# you must adjust the value of DEFAULT_MODPOSTFIX according to
@ -18,7 +18,7 @@ endif
bin_PROGRAMS = qseawk
qseawk_SOURCES = awk.c
qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn -L$(libdir)
qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn
qseawk_LDADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL)
if WIN32

View File

@ -277,9 +277,9 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(includedir) $(LTDLINCL) $(am__append_1) $(am__append_2)
$(LTDLINCL) $(am__append_1) $(am__append_2)
qseawk_SOURCES = awk.c
qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn -L$(libdir)
qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn
qseawk_LDADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL) $(am__append_3)
all: all-am

View File

@ -2,8 +2,7 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
qsecfgdir = $(sysconfdir)/qse
@ -12,7 +11,7 @@ qsecfg_DATA = httpd.conf httpd-mime.conf
bin_PROGRAMS = qsehttpd
qsehttpd_SOURCES = httpd.c
qsehttpd_LDFLAGS = -L../../lib/xli -L../../lib/http -L../../lib/cmn -L$(libdir)
qsehttpd_LDFLAGS = -L../../lib/xli -L../../lib/http -L../../lib/cmn
qsehttpd_LDADD = -lqsexli -lqsehttp -lqsecmn
if WIN32

View File

@ -301,13 +301,12 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
qsecfgdir = $(sysconfdir)/qse
qsecfg_DATA = httpd.conf httpd-mime.conf
qsehttpd_SOURCES = httpd.c
qsehttpd_LDFLAGS = -L../../lib/xli -L../../lib/http -L../../lib/cmn -L$(libdir)
qsehttpd_LDFLAGS = -L../../lib/xli -L../../lib/http -L../../lib/cmn
qsehttpd_LDADD = -lqsexli -lqsehttp -lqsecmn $(am__append_1)
EXTRA_DIST = $(qsecfg_DATA)
all: all-am

View File

@ -2,13 +2,12 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
bin_PROGRAMS = qsesed
qsesed_SOURCES = sed.c
qsesed_LDFLAGS = -L../../lib/sed -L../../lib/cmn -L$(libdir)
qsesed_LDFLAGS = -L../../lib/sed -L../../lib/cmn
qsesed_LDADD = -lqsesed -lqsecmn
if WIN32

View File

@ -272,11 +272,10 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
qsesed_SOURCES = sed.c
qsesed_LDFLAGS = -L../../lib/sed -L../../lib/cmn -L$(libdir)
qsesed_LDFLAGS = -L../../lib/sed -L../../lib/cmn
qsesed_LDADD = -lqsesed -lqsecmn $(am__append_1)
all: all-am

View File

@ -2,13 +2,12 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
bin_PROGRAMS = qsestx
qsestx_SOURCES = stx.c
qsestx_LDFLAGS = -L../../lib/stx -L../../lib/cmn -L$(libdir)
qsestx_LDFLAGS = -L../../lib/stx -L../../lib/cmn
qsestx_LDADD = -lqsestx -lqsecmn $(LIBM)
if WIN32

View File

@ -2,13 +2,12 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
bin_PROGRAMS = qsexli
qsexli_SOURCES = xli.c
qsexli_LDFLAGS = -L../../lib/xli -L../../lib/cmn -L$(libdir)
qsexli_LDFLAGS = -L../../lib/xli -L../../lib/cmn
qsexli_LDADD = -lqsexli -lqsecmn
if WIN32

View File

@ -272,11 +272,10 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
qsexli_SOURCES = xli.c
qsexli_LDFLAGS = -L../../lib/xli -L../../lib/cmn -L$(libdir)
qsexli_LDFLAGS = -L../../lib/xli -L../../lib/cmn
qsexli_LDADD = -lqsexli -lqsecmn $(am__append_1)
all: all-am

31
qse/configure vendored
View File

@ -830,6 +830,7 @@ with_included_ltdl
with_ltdl_include
with_ltdl_lib
enable_ltdl_install
enable_ssl
enable_wchar
enable_bundled_unicode
enable_xcmgrs
@ -1482,6 +1483,7 @@ Optional Features:
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-ltdl-install install libltdl
--enable-ssl build the library in the ssl mode (default. yes)
--enable-wchar Use the wide character type as the default charater
type when enabled (default. yes)
--enable-bundled-unicode
@ -18057,7 +18059,16 @@ fi
for ac_func in SSL_library_init
# Check whether --enable-ssl was given.
if test "${enable_ssl+set}" = set; then :
enableval=$enable_ssl; enable_ssl_is=$enableval
else
enable_ssl_is=yes
fi
if test "$enable_ssl_is" = "yes"
then
for ac_func in SSL_library_init
do :
ac_fn_c_check_func "$LINENO" "SSL_library_init" "ac_cv_func_SSL_library_init"
if test "x$ac_cv_func_SSL_library_init" = xyes; then :
@ -18068,13 +18079,13 @@ _ACEOF
fi
done
if test "$ac_cv_func_SSL_library_init" = "yes"
then
if test "$ac_cv_func_SSL_library_init" = "yes"
then
$as_echo "#define HAVE_SSL 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
$as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
$as_echo_n "(cached) " >&6
@ -18112,12 +18123,12 @@ fi
$as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
SSL_LIBS="-lssl"
SSL_LIBS="-lssl"
$as_echo "#define HAVE_SSL 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_get_error in -lcrypto" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ERR_get_error in -lcrypto" >&5
$as_echo_n "checking for ERR_get_error in -lcrypto... " >&6; }
if ${ac_cv_lib_crypto_ERR_get_error+:} false; then :
$as_echo_n "(cached) " >&6
@ -18155,17 +18166,17 @@ fi
$as_echo "$ac_cv_lib_crypto_ERR_get_error" >&6; }
if test "x$ac_cv_lib_crypto_ERR_get_error" = xyes; then :
SSL_LIBS="${SSL_LIBS} -lcrypto"
SSL_LIBS="${SSL_LIBS} -lcrypto"
fi
$as_echo "#define HAVE_SSL_LIBRARY_INIT 1" >>confdefs.h
$as_echo "#define HAVE_SSL_LIBRARY_INIT 1" >>confdefs.h
fi
fi
fi

View File

@ -238,25 +238,29 @@ dnl the existence of the libaray.
AC_CHECK_LIB([unicows], [main], [UNICOWS_LIBS="-lunicows"])
AC_SUBST(UNICOWS_LIBS)
dnl check for an SSL library
AC_CHECK_FUNCS([SSL_library_init])
if test "$ac_cv_func_SSL_library_init" = "yes"
AC_ARG_ENABLE([ssl], [AS_HELP_STRING([--enable-ssl],[build the library in the ssl mode (default. yes)])],
enable_ssl_is=$enableval,enable_ssl_is=yes)
if test "$enable_ssl_is" = "yes"
then
AC_DEFINE(HAVE_SSL, 1, [ssl support])
else
AC_CHECK_LIB([ssl], [SSL_library_init], [
SSL_LIBS="-lssl"
dnl check for an SSL library
AC_CHECK_FUNCS([SSL_library_init])
if test "$ac_cv_func_SSL_library_init" = "yes"
then
AC_DEFINE(HAVE_SSL, 1, [ssl support])
else
AC_CHECK_LIB([ssl], [SSL_library_init], [
SSL_LIBS="-lssl"
AC_DEFINE(HAVE_SSL, 1, [ssl support])
dnl additional check
AC_CHECK_LIB([crypto], [ERR_get_error], [
SSL_LIBS="${SSL_LIBS} -lcrypto"
dnl additional check
AC_CHECK_LIB([crypto], [ERR_get_error], [
SSL_LIBS="${SSL_LIBS} -lcrypto"
])
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SSL_LIBRARY_INIT, 1)
])
dnl only for consistency with AC_CHECK_FUNCS
AC_DEFINE(HAVE_SSL_LIBRARY_INIT, 1)
])
fi
fi
AC_SUBST(SSL_LIBS)

View File

@ -2,10 +2,9 @@ AUTOMAKE_OPTIONS = nostdinc
CPPFLAGS_ALL_COMMON = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
LDFLAGS_ALL_COMMON = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
LDFLAGS_ALL_COMMON = -L. -L../cmn -version-info 1:0:0 -no-undefined
##################################################
# MAIN LIBRARY

View File

@ -427,10 +427,9 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
CPPFLAGS_ALL_COMMON = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
LDFLAGS_ALL_COMMON = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
LDFLAGS_ALL_COMMON = -L. -L../cmn -version-info 1:0:0 -no-undefined
##################################################
# MAIN LIBRARY

View File

@ -2,9 +2,7 @@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsecmn.la
@ -119,7 +117,7 @@ libqsecmn_la_SOURCES += cp949.c cp950.c
endif
libqsecmn_la_LDFLAGS = -L$(libdir) -version-info 1:0:0 -no-undefined
libqsecmn_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libqsecmn_la_LIBADD = $(SOCKET_LIBS)
if ENABLE_CXX
@ -127,7 +125,7 @@ if ENABLE_CXX
lib_LTLIBRARIES += libqsecmnxx.la
libqsecmnxx_la_SOURCES = \
Mmgr.cpp StdMmgr.cpp
libqsecmnxx_la_LDFLAGS = -L$(libdir) -version-info 1:0:0 -no-undefined
libqsecmnxx_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libqsecmnxx_la_LIBADD =
endif

View File

@ -359,8 +359,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsecmn.la $(am__append_3)
noinst_HEADERS = \
@ -391,12 +390,12 @@ libqsecmn_la_SOURCES = alg-base64.c alg-rand.c alg-search.c alg-sort.c \
task.c time.c tio.c tre.c tre-ast.c tre-compile.c \
tre-match-backtrack.c tre-match-parallel.c tre-parse.c \
tre-stack.c uri.c utf8.c xma.c $(am__append_1) $(am__append_2)
libqsecmn_la_LDFLAGS = -L$(libdir) -version-info 1:0:0 -no-undefined
libqsecmn_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libqsecmn_la_LIBADD = $(SOCKET_LIBS)
@ENABLE_CXX_TRUE@libqsecmnxx_la_SOURCES = \
@ENABLE_CXX_TRUE@ Mmgr.cpp StdMmgr.cpp
@ENABLE_CXX_TRUE@libqsecmnxx_la_LDFLAGS = -L$(libdir) -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqsecmnxx_la_LDFLAGS = -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqsecmnxx_la_LIBADD =
all: all-am

View File

@ -2,8 +2,7 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsehttp.la
libqsehttp_la_SOURCES = \
@ -23,6 +22,6 @@ libqsehttp_la_SOURCES = \
httpd-text.c \
upxd.c
libqsehttp_la_LDFLAGS = -version-info 1:0:0 -no-undefined -L../cmn -L$(libdir)
libqsehttp_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsehttp_la_LIBADD = -lqsecmn $(SOCKET_LIBS) $(SENDFILE_LIBS) $(SSL_LIBS)

View File

@ -300,8 +300,7 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsehttp.la
libqsehttp_la_SOURCES = \
@ -321,7 +320,7 @@ libqsehttp_la_SOURCES = \
httpd-text.c \
upxd.c
libqsehttp_la_LDFLAGS = -version-info 1:0:0 -no-undefined -L../cmn -L$(libdir)
libqsehttp_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsehttp_la_LIBADD = -lqsecmn $(SOCKET_LIBS) $(SENDFILE_LIBS) $(SSL_LIBS)
all: all-am

View File

@ -2,18 +2,17 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsesed.la
libqsesed_la_SOURCES = sed.c err.c sed.h std.c
libqsesed_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsesed_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsesed_la_LIBADD = -lqsecmn
if ENABLE_CXX
lib_LTLIBRARIES += libqsesedxx.la
libqsesedxx_la_SOURCES = Sed.cpp StdSed.cpp
libqsesedxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsesedxx_la_LDFLAGS = -L. -L../cmn -version-info 1:0:0 -no-undefined
libqsesedxx_la_LIBADD = -lqsesed -lqsecmnxx -lqsecmn
endif

View File

@ -322,15 +322,14 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsesed.la $(am__append_1)
libqsesed_la_SOURCES = sed.c err.c sed.h std.c
libqsesed_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsesed_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsesed_la_LIBADD = -lqsecmn
@ENABLE_CXX_TRUE@libqsesedxx_la_SOURCES = Sed.cpp StdSed.cpp
@ENABLE_CXX_TRUE@libqsesedxx_la_LDFLAGS = -L. -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqsesedxx_la_LDFLAGS = -L. -L../cmn -version-info 1:0:0 -no-undefined
@ENABLE_CXX_TRUE@libqsesedxx_la_LIBADD = -lqsesed -lqsecmnxx -lqsecmn
all: all-am

View File

@ -3,13 +3,12 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsestx.la
libqsestx_la_SOURCES = \
stx.h hash.h mem.h obj.h sym.h dic.h cls.h boot.h \
stx.c err.c hash.c mem.c obj.c sym.c dic.c cls.c boot.c par.c
libqsestx_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsestx_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsestx_la_LIBADD = -lqsecmn

View File

@ -2,11 +2,10 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsexli.la
libqsexli_la_SOURCES = xli.h xli.c err.c read.c write.c std.c
libqsexli_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsexli_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsexli_la_LIBADD = -lqsecmn

View File

@ -295,12 +295,11 @@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = nostdinc
AM_CPPFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(includedir)
-I$(top_srcdir)/include
lib_LTLIBRARIES = libqsexli.la
libqsexli_la_SOURCES = xli.h xli.c err.c read.c write.c std.c
libqsexli_la_LDFLAGS = -L../cmn -L$(libdir) -version-info 1:0:0 -no-undefined
libqsexli_la_LDFLAGS = -L../cmn -version-info 1:0:0 -no-undefined
libqsexli_la_LIBADD = -lqsecmn
all: all-am