From cc80e214d7b4e0d16fe7c095696ba70f81fc632c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 6 May 2014 10:21:07 +0000 Subject: [PATCH] fixed compile issues; refs #40 --- COPYING | 2 +- INSTALL | 2 +- configure.in | 25 ++++++++++++++++++++----- src/makefile.am | 7 +++---- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/COPYING b/COPYING index 6168a39..2fcb217 120000 --- a/COPYING +++ b/COPYING @@ -1 +1 @@ -/usr/share/automake-1.11/COPYING \ No newline at end of file +/usr/share/automake-1.13/COPYING \ No newline at end of file diff --git a/INSTALL b/INSTALL index cbd1c80..8b641e3 120000 --- a/INSTALL +++ b/INSTALL @@ -1 +1 @@ -/usr/share/automake-1.11/INSTALL \ No newline at end of file +/usr/share/automake-1.13/INSTALL \ No newline at end of file diff --git a/configure.in b/configure.in index b76d2db..aa1df12 100644 --- a/configure.in +++ b/configure.in @@ -73,7 +73,8 @@ AC_SUBST_FILE(README) CHANGE_LOG=ChangeLog AC_SUBST_FILE(CHANGE_LOG) -AM_CPPFLAGS="-DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" +LIBS="${LIBS}" +CPPFLAGS="${CPPFLAGS} -DPACKAGEVERSION='\"${VERSION}\"' -DPACKAGENAME='\"${PACKAGENAME}\"'" # Get rid of that stupid -O2 -g opions! CXXFLAGS="${CXXFLAGS:-}" @@ -93,6 +94,18 @@ AC_CHECK_PROG(have_dot, dot, yes, no) PKG_PROG_PKG_CONFIG # libraries +case $host in + (*mingw*|*win*) + LIBS+=" -lwinhttp" + CXXFLAGS+=" -DQ_OS_WIN32" + ;; + (*) + PKG_CHECK_MODULES([PROXY], [libproxy-1.0], + [LIBS+=" ${PROXY_LIBS}" + CXXFLAGS+=" ${PROXY_CFLAGS}" + have_proxy=1]) + ;; +esac PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets QtNetwork], [AC_DEFINE([HAVE_QT]) UIC=${UIC:-$(pkg-config --variable=uic_location Qt5Core)} @@ -100,6 +113,8 @@ PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets QtNetwork], RCC=${RCC:-$(pkg-config --variable=rcc_location Qt5Core)} LUPDATE=${LUPDATE:-$(pkg-config --variable=lupdate_location Qt5Core)} LRELEASE=${LRELEASE:-$(pkg-config --variable=lrelease_location Qt5Core)} + CXXFLAGS+=" -DQT_NETWORK_LIB ${QT_CFLAGS}" + LIBS+=" ${QT_LIBS}" have_qt=1], [PKG_CHECK_MODULES([QT], [QtCore QtGui QtNetwork], [AC_DEFINE([HAVE_QT]) @@ -108,6 +123,8 @@ PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets QtNetwork], RCC=${RCC:-$(pkg-config --variable=rcc_location QtCore)} LUPDATE=${LUPDATE:-$(pkg-config --variable=lupdate_location QtCore)} LRELEASE=${LRELEASE:-$(pkg-config --variable=lrelease_location QtCore)} + CXXFLAGS+=" -DQT_NETWORK_LIB ${QT_CFLAGS}" + LIBS+=" ${QT_LIBS}" have_qt=1], [have_qt=0])]) AM_CONDITIONAL(HAVE_QT, test "$have_qt" = "1") @@ -116,12 +133,13 @@ AC_SUBST(MOC) AC_SUBST(RCC) AC_SUBST(LUPDATE) AC_SUBST(LRELEASE) +AC_ARG_VAR(LUPDATE_ARGS, [arguments for qt lupdate command, e.g. -no-obsolete]) AC_ARG_ENABLE(pedantic, [AS_HELP_STRING([--enable-pedantic], [enable all warnings and checks, abort on warnings])], [have_pedantic="$enableval"; test "$enableval" = "yes" && \ - AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) + CXXFLAGS+=" -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) dnl problem in libs: -Wshadow -Wcast-qual dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") @@ -157,9 +175,6 @@ AC_SUBST(DOC_DIR) AC_SUBST(HAVE_DOT) AC_SUBST(THREADS) AC_SUBST(PACKAGENAME) -AC_SUBST(AM_CXXFLAGS) -AC_SUBST(AM_CPPFLAGS) -AC_SUBST(LIBS) # create output AC_OUTPUT diff --git a/src/makefile.am b/src/makefile.am index 199f60a..ecf892c 100644 --- a/src/makefile.am +++ b/src/makefile.am @@ -27,7 +27,8 @@ EXTRA_DIST = ${UISOURCES} $(pkgconfig_DATA).in version.cxx.in BUILT_SOURCES = ${UIHEADER} ${MOCSOURCES} ${LANGUAGES} ${RESOURCES} version.cxx proxyfacedir = ${includedir}/proxyface -proxyface_HEADERS = proxyface/unix.hxx proxyface/windoze.hxx proxyface/qtproxy.hxx \ +proxyface_HEADERS = proxyface/unix.hxx proxyface/windoze.hxx \ + proxyface/qtproxy.hxx \ ${MOCHEADER} ${UIHEADER} lib_LTLIBRARIES = libproxyface.la @@ -35,15 +36,13 @@ lib_LTLIBRARIES = libproxyface.la libproxyface_la_SOURCES = ${MOCSOURCES} ${LANGUAGES} ${RESOURCES} version.cxx libproxyface_la_LDFLAGS = -version-info ${LIB_VERSION} -AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} - rebuild-ts: ${LANG_TS} %.cxx: %.qrc ${RCC} -o $@ $< moc_%.cxx: %.hxx - ${MOC} -DMOC ${CPPFLAGS} ${AM_CPPFLAGS} -o $@ $< + ${MOC} -DMOC ${CPPFLAGS} ${CXXFLAGS} -o $@ $< ui_%.hxx: %.ui ${UIC} -o $@ $<