From 191d8cf5e5de41ac63ba88d39178aa28a8e73bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 8 Apr 2009 07:25:51 +0000 Subject: [PATCH] new build system --- configure.in | 56 ++++++++++++++++++++++- install-64-and-32-bit-linux.sh | 21 +++++++++ makefile.am | 11 +++-- autoproxy.hxx => proxyface/autoproxy.hxx | 0 proxyface/makefile.am | 34 ++++++++++++++ proxyface/{gui => }/proxy.hxx | 4 +- proxyface/{gui => }/proxy.ui | 0 uninstall-64-and-32-bit-linux.sh | 18 ++++++++ winhttp.a | Bin 9038 -> 0 bytes 9 files changed, 137 insertions(+), 7 deletions(-) create mode 100755 install-64-and-32-bit-linux.sh rename autoproxy.hxx => proxyface/autoproxy.hxx (100%) create mode 100644 proxyface/makefile.am rename proxyface/{gui => }/proxy.hxx (98%) rename proxyface/{gui => }/proxy.ui (100%) create mode 100755 uninstall-64-and-32-bit-linux.sh delete mode 100644 winhttp.a 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 e317db533dba6b857e9da56d229f3935932fedbe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9038 zcmeI2UvJz*5WwerNt2!m6ev(=L9SE;Lg={vxj+?Nl|qYzln|&u2yt~{hqHS19d}Ne zA|CS4M;`jb=ZSdakx#*=pv>%ld+na@fmEkvm0jDjvtIAa@5W<0*KT-|y}?H16E|7v zjb^*KzFu$DTo?ban62w}nq4vAUIhT&1aSTYSpF1X)#bJFHvrX_e&_Y#HUQPvQJv}= zfAM$K$@&4>-ng+e}u#A2+((`Y5 zv1ec04lYOa2<@*Ag2^Ki-aPcep|?AZU^!9 zWOVfCi_zrnWN5D@qhE~N97R#E7u!S34yijFO@ljL`{ zkWP5LC3Tl@X9=&%EIqB)mU7Zt&DUF#dKYl#LWZ8~f5?AlRev~y>V7y3M905R0e&v+ zd-tV4$W1%ZY0If|lbUHGCr`()PdQJ=unn!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