diff --git a/configure.in b/configure.in index 9c7a7a9..b5b35dc 100644 --- a/configure.in +++ b/configure.in @@ -6,10 +6,64 @@ LEAST=0 AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) +AC_CONFIG_FILES([makefile proxyface/makefile]) + +# programs +AC_PROG_CXX +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +AC_PROG_LIBTOOL + +# libtool versioning +LIB_MAJOR=$(($MAJOR+$MINOR)) +LIB_MINOR=$LEAST +LIB_LEAST=$MINOR +LIB_VERSION="${LIB_MAJOR}:${LIB_MINOR}:${LIB_LEAST}" +AC_SUBST(LIB_VERSION) + AC_SUBST(PACKAGENAME) AC_SUBST(MAJOR) AC_SUBST(MINOR) AC_SUBST(LEAST) -AC_CONFIG_FILES([makefile]) +case $host in + *mingw*|*win*) + PROXYLIB="-lwinhttp" + ;; + *) + PROXYLIB="-lproxy" + ;; +esac +AC_SUBST(PROXYLIB) + +# Qt Environment +CPPFLAGS+=" -DUNICODE -DQT_NO_DEBUG" +CPPFLAGS+=" -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB" +AC_CHECK_HEADER(QtCore/QString, [found="yes"], [found="no"]) +if test "$found" == "no"; then + AC_MSG_CHECKING([looking for qt headers]) + for file in /usr/include/qt4 /usr/local/include/qt4 /opt/include/qt4 \ + /opt/local/include/qt4 /usr/include /usr/local/include \ + /opt/include /opt/local/include; do + if test -d ${file}/QtCore; then + CPPFLAGS+=" -I$file" + found=$file + break; + fi + done + AC_MSG_RESULT([$found]) +fi +if test "$found" == "no"; then + AC_MSG_ERROR([Qt Headers not found]) +fi +AC_CHECK_PROGS([MOC], [moc-qt4 moc-mac moc]) +test -n "$MOC" || AC_MSG_ERROR([moc for Qt 4 not found!]) +AC_SUBST(MOC) +AC_CHECK_PROGS([UIC], [uic-qt4 uic-mac uic]) +test -n "$UIC" || AC_MSG_ERROR([uic for Qt 4 not found!]) +AC_SUBST(UIC) + AC_OUTPUT + diff --git a/install-64-and-32-bit-linux.sh b/install-64-and-32-bit-linux.sh new file mode 100755 index 0000000..1cf121b --- /dev/null +++ b/install-64-and-32-bit-linux.sh @@ -0,0 +1,21 @@ +./bootstrap.sh && \ +LDFLAGS="-L/usr/lib32 -m32" CXXFLAGS="-m32" ./configure \ + --libdir=/usr/local/lib32 \ + --build=x86_64 \ + --host=i386 && \ +make && \ +sudo make install && \ +make clean && \ +LDFLAGS="-L/opt/local/i586-mingw32msvc/lib" \ + CPPFLAGS="-I/opt/local/i586-mingw32msvc/include" \ + ./configure \ + --prefix=/opt/local/i586-mingw32msvc \ + --build=x86_64 \ + --host=i586-mingw32msvc && \ +make && \ +sudo make install && \ +make clean && \ +./configure && \ +make check && \ +sudo make install + diff --git a/makefile.am b/makefile.am index 0bf4f99..869858a 100644 --- a/makefile.am +++ b/makefile.am @@ -1,5 +1,8 @@ -nobase_include_HEADERS = autoproxy.hxx proxyface/unix.hxx \ - proxyface/windoze.hxx proxyface/gui/proxy.hxx +SUBDIRS = proxyface -MAINTAINERCLEANFILES = configure makefile.in ltmain.sh missing \ - aclocal.m4 install-sh +maintainer-clean-local: + - find . -name '*~' | xargs rm + - rm -r autom4te.cache + - rm aclocal.m4 config.guess config.sub configure \ + depcomp install-sh ltmain.sh makefile makefile.in \ + missing mkinstalldirs diff --git a/autoproxy.hxx b/proxyface/autoproxy.hxx similarity index 100% rename from autoproxy.hxx rename to proxyface/autoproxy.hxx diff --git a/proxyface/makefile.am b/proxyface/makefile.am new file mode 100644 index 0000000..1d6b562 --- /dev/null +++ b/proxyface/makefile.am @@ -0,0 +1,34 @@ +UISOURCES = proxy.ui +MOCHEADER = proxy.hxx autoproxy.hxx + +UIHEADER = ui_proxy.hxx +MOCSOURCES = moc_proxy.cxx moc_autoproxy.cxx + +BUILT_SOURCES = ${UIHEADER} ${MOCSOURCES} + +proxyfacedir = ${includedir}/proxyface +proxyface_HEADERS = autoproxy.hxx unix.hxx windoze.hxx \ + ${MOCHEADER} ${UIHEADER} + +lib_LTLIBRARIES = libproxyface.la + +libproxyface_la_SOURCES = ${MOCSOURCES} +libproxyface_la_LIBADD = ${PROXYLIB} +libproxyface_la_LDFLAGS = -version-info ${LIB_VERSION} + +AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir} + +moc_%.cxx: %.hxx + ${MOC} ${CPPFLAGS} ${AM_CPPFLAGS} -o $@ $< + +ui_%.hxx: %.ui + ${UIC} -o $@ $< + +CLEANFILES = ${UIHEADER} ${MOCSOURCES} + +maintainer-clean-local: + - find . -name '*~' | xargs rm + - rm -r autom4te.cache + - rm aclocal.m4 config.guess config.sub configure \ + depcomp install-sh ltmain.sh makefile makefile.in \ + missing mkinstalldirs diff --git a/proxyface/gui/proxy.hxx b/proxyface/proxy.hxx similarity index 98% rename from proxyface/gui/proxy.hxx rename to proxyface/proxy.hxx index fbc2f64..87d6d75 100644 --- a/proxyface/gui/proxy.hxx +++ b/proxyface/proxy.hxx @@ -8,8 +8,8 @@ #ifndef PROXY_HXX #define PROXY_HXX -#include -#include +#include +#include #include #include #include diff --git a/proxyface/gui/proxy.ui b/proxyface/proxy.ui similarity index 100% rename from proxyface/gui/proxy.ui rename to proxyface/proxy.ui diff --git a/uninstall-64-and-32-bit-linux.sh b/uninstall-64-and-32-bit-linux.sh new file mode 100755 index 0000000..3b0cea1 --- /dev/null +++ b/uninstall-64-and-32-bit-linux.sh @@ -0,0 +1,18 @@ +./bootstrap.sh && \ +LDFLAGS="-L/usr/lib32 -m32" CXXFLAGS="-m32" ./configure \ + --libdir=/usr/local/lib32 \ + --build=x86_64 \ + --host=i386 && \ +sudo make uninstall && \ +make clean && \ +LDFLAGS="-L/opt/local/i586-mingw32msvc/lib" \ + CPPFLAGS="-I/opt/local/i586-mingw32msvc/include" \ + ./configure \ + --prefix=/opt/local/i586-mingw32msvc \ + --build=x86_64 \ + --host=i586-mingw32msvc && \ +sudo make uninstall && \ +make clean && \ +./configure && \ +sudo make uninstall + diff --git a/winhttp.a b/winhttp.a deleted file mode 100644 index e317db5..0000000 Binary files a/winhttp.a and /dev/null differ