From 54174c222c192111c4c8ed6a3b251e21b6a8a3ba Mon Sep 17 00:00:00 2001 From: simorl Date: Sun, 21 Jun 2009 21:38:37 +0200 Subject: [PATCH] - make zip works - buddylookup plugin compiles. --- linphone/Makefile.am | 3 +- linphone/README.mingw | 19 ++-- linphone/configure.in | 8 +- linphone/coreapi/plugins/buddylookup/INSTALL | 97 ++++--------------- .../coreapi/plugins/buddylookup/Makefile.am | 20 ++++ .../coreapi/plugins/buddylookup/autogen.sh | 2 +- .../coreapi/plugins/buddylookup/configure.ac | 10 +- .../plugins/buddylookup/src/Makefile.am | 12 ++- linphone/coreapi/sipsetup.c | 8 -- linphone/gtk-glade/Makefile.am | 5 +- linphone/gtk-glade/linphone.h | 7 -- linphone/gtk-glade/main.c | 8 -- linphone/mediastreamer2/mediastreamer.pc.in | 2 +- linphone/share/Makefile.inc | 2 +- linphone/share/linphone.pc.in | 2 +- 15 files changed, 88 insertions(+), 117 deletions(-) mode change 100644 => 100755 linphone/coreapi/plugins/buddylookup/INSTALL diff --git a/linphone/Makefile.am b/linphone/Makefile.am index b7e0073f7..ed8c6d342 100644 --- a/linphone/Makefile.am +++ b/linphone/Makefile.am @@ -55,6 +55,7 @@ zip: rm -rf $(INSTALLDIR) mkdir -p $(INSTALLDIR) make install DESTDIR=$(INSTALLDIR) - cd $(INSTALLDIR)/$(prefix) && zip -r $(ZIPFILE) * + cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \ + zip -r $(ZIPFILE) * \ No newline at end of file diff --git a/linphone/README.mingw b/linphone/README.mingw index 585329aa5..a212ed328 100644 --- a/linphone/README.mingw +++ b/linphone/README.mingw @@ -27,21 +27,28 @@ export PERL="/c/Perl/bin/perl" export INTLTOOL_PERL="/c/Perl/bin/perl" #run autogen.sh after a git/svn checkout or update ./autogen.sh -./configure --enable-shared --disable-static --with-osip=/usr/local +./configure --prefix=/opt/linphone --enable-shared --disable-static --with-osip=/usr/local make -make install DESTDIR=/c/linphone-install +#will install to /opt/linphone, useful for compilation of plugins. +make install +#make a binary zip of linphone +make zip #build plugins cd mediastreamer2/plugins/msx264 ./autogen.sh -PKG_CONFIG_PATH=/c/linphone-install/lib/pkgconfig ./configure --enable-shared --disable-static -make install DESTDIR=/c/msx264-install +PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static +make +#make a binary zip of this plugin +make zip cd coreapi/plugins/buddyloolup ./autogen.sh -PKG_CONFIG_PATH=/c/linphone-install/lib/pkgconfig ./configure --enable-shared --disable-static -make install DESTDIR=/c/buddylookup-install +PKG_CONFIG_PATH=/opt/linphone/lib/pkgconfig ./configure --prefix=/opt/linphone --enable-shared --disable-static +make +#make a binary zip of this plugin +make zip ****************************************************** diff --git a/linphone/configure.in b/linphone/configure.in index f49ab7cef..f3b06e185 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -74,7 +74,7 @@ AM_GNU_GETTEXT([external]) else AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible]) AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible]) -LIBS="$LIBS -lintl" +LIBS="$LIBS -L/usr/local/lib -lintl" fi GETTEXT_PACKAGE=linphone @@ -309,8 +309,12 @@ AC_CHECK_PROG(have_sgmltools,sgmltools, yes, no) AM_CONDITIONAL(ENABLE_MANUAL, test x$have_sgmltools$build_manual = xyesyes ) dnl for external use of linphone libs -LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone -I${includedir}/ortp " +LINPHONE_CFLAGS="-I${includedir} -I${includedir}/linphone " LINPHONE_LIBS="-L${libdir} -llinphone" + +if test x$mingw_found = xyes ; then + LINPHONE_LIBS="$LINPHONE_LIBS $OSIP_LIBS" +fi AC_SUBST(LINPHONE_CFLAGS) AC_SUBST(LINPHONE_LIBS) diff --git a/linphone/coreapi/plugins/buddylookup/INSTALL b/linphone/coreapi/plugins/buddylookup/INSTALL old mode 100644 new mode 100755 index 8b82ade08..5458714e1 --- a/linphone/coreapi/plugins/buddylookup/INSTALL +++ b/linphone/coreapi/plugins/buddylookup/INSTALL @@ -2,15 +2,15 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008 Free Software Foundation, Inc. +2006 Free Software Foundation, Inc. - This file is free documentation; the Free Software Foundation gives +This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should +Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. @@ -67,15 +67,12 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. - Compilers and Options ===================== - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here @@ -88,7 +85,7 @@ is an example: Compiling For Multiple Architectures ==================================== - You can compile the package for more than one kind of computer at the +You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run @@ -100,24 +97,10 @@ architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. - On MacOS X 10.5 and later systems, you can create libraries and -executables that work on multiple system types--known as "fat" or -"universal" binaries--by specifying multiple `-arch' options to the -compiler but only a single `-arch' option to the preprocessor. Like -this: - - ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ - CPP="gcc -E" CXXCPP="g++ -E" - - This is not guaranteed to produce working output in all cases, you -may have to build one architecture at a time and combine the results -using the `lipo' tool if you have problems. - Installation Names ================== - By default, `make install' installs the package's commands under +By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. @@ -140,7 +123,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= - Some packages pay attention to `--enable-FEATURE' options to +Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -152,36 +135,14 @@ find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. -Particular systems -================== - - On HP-UX, the default C compiler is not ANSI C compatible. If GNU -CC is not installed, it is recommended to use the following options in -order to use an ANSI C compiler: - - ./configure CC="cc -Ae" - -and if that doesn't work, install pre-built binaries of GCC for HP-UX. - - On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot -parse its `' header file. The option `-nodtk' can be used as -a workaround. If GNU CC is not installed, it is therefore recommended -to try - - ./configure CC="cc" - -and if that doesn't work, try - - ./configure CC="cc -nodtk" - Specifying the System Type ========================== - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -207,9 +168,9 @@ eventually be run) with `--host=TYPE'. Sharing Defaults ================ - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -218,7 +179,7 @@ A warning: not all `configure' scripts look for a site script. Defining Variables ================== - Variables not defined in a site shell script can be set in the +Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -237,19 +198,11 @@ an Autoconf bug. Until the bug is fixed you can use this workaround: `configure' Invocation ====================== - `configure' recognizes the following options to control how it -operates. +`configure' recognizes the following options to control how it operates. `--help' `-h' - Print a summary of all of the options to `configure', and exit. - -`--help=short' -`--help=recursive' - Print a summary of the options unique to this package's - `configure', and exit. The `short' variant lists options used - only in the top level, while the `recursive' variant lists options - also present in any nested packages. + Print a summary of the options to `configure', and exit. `--version' `-V' @@ -276,16 +229,6 @@ operates. Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: - for more details, including other options available for fine-tuning - the installation locations. - -`--no-create' -`-n' - Run the configure checks, but stop before creating any output - files. - `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. diff --git a/linphone/coreapi/plugins/buddylookup/Makefile.am b/linphone/coreapi/plugins/buddylookup/Makefile.am index 1bfdcf486..d41d2ef3e 100644 --- a/linphone/coreapi/plugins/buddylookup/Makefile.am +++ b/linphone/coreapi/plugins/buddylookup/Makefile.am @@ -1 +1,21 @@ SUBDIRS=src + + + +INSTALLDIR=$(shell cd $(top_builddir) && pwd)/buddylookup-install +ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip +ZIP_EXCLUDED=include + + + +zip: + rm -f $(ZIPFILE) + rm -rf $(INSTALLDIR) + mkdir -p $(INSTALLDIR) + make install DESTDIR=$(INSTALLDIR) + cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \ + zip -r $(ZIPFILE) * + +clean-local: + rm -rf buddylookup-install + rm $(PACKAGE)-win32-$(VERSION).zip diff --git a/linphone/coreapi/plugins/buddylookup/autogen.sh b/linphone/coreapi/plugins/buddylookup/autogen.sh index ee0dd4838..cbe603ee8 100755 --- a/linphone/coreapi/plugins/buddylookup/autogen.sh +++ b/linphone/coreapi/plugins/buddylookup/autogen.sh @@ -10,7 +10,7 @@ else AUTOMAKE=automake-${AM_VERSION} fi -echo "Generating build scripts in mediastreamer..." +echo "Generating build scripts in buddylookup..." set -x libtoolize --copy --force autoheader diff --git a/linphone/coreapi/plugins/buddylookup/configure.ac b/linphone/coreapi/plugins/buddylookup/configure.ac index 3f1fd3d0e..3ddda90f8 100644 --- a/linphone/coreapi/plugins/buddylookup/configure.ac +++ b/linphone/coreapi/plugins/buddylookup/configure.ac @@ -9,6 +9,12 @@ AM_INIT_AUTOMAKE([tar-ustar]) AC_CANONICAL_SYSTEM +case $target_os in + *mingw*) + mingw_found=yes + ;; +esac + AC_MSG_CHECKING([warning make an error on compilation]) AC_ARG_ENABLE(strict, [ --enable-strict Enable error on compilation warning [default=yes]], @@ -26,8 +32,8 @@ AC_PROG_LIBTOOL # Checks for libraries. -PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= 2.4.0) +PKG_CHECK_MODULES(LIBSOUP, libsoup-2.4 >= 2.4.0) PKG_CHECK_MODULES(LIBLINPHONE, linphone >= 3.0.0) LINPHONE_PLUGINS_DIR="\$(libdir)/liblinphone/plugins/" @@ -48,6 +54,8 @@ LDFLAGS="$LDFLAGS -rdynamic " fi fi +AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes) + AC_OUTPUT( Makefile src/Makefile diff --git a/linphone/coreapi/plugins/buddylookup/src/Makefile.am b/linphone/coreapi/plugins/buddylookup/src/Makefile.am index 94d4bd73b..f965a9d8c 100644 --- a/linphone/coreapi/plugins/buddylookup/src/Makefile.am +++ b/linphone/coreapi/plugins/buddylookup/src/Makefile.am @@ -4,7 +4,17 @@ plugins_LTLIBRARIES=libbuddylookup.la libbuddylookup_la_SOURCES=lookup.c -libbuddylookup_la_LIBADD=$(LIBSOUP_LIBS) $(LIBLINPHONE_LIBS) +libbuddylookup_la_LIBADD=$(LIBSOUP_LIBS) $(LIBLINPHONE_LIBS) + +libbuddylookup_la_LDFLAGS=-no-undefined AM_CFLAGS= $(LIBLINPHONE_CFLAGS) $(LIBSOUP_CFLAGS) +if BUILD_WIN32 +#hack for mingw to force plugins dll to be where we want them to be. +install-data-hook: + mv $(DESTDIR)$(pluginsdir)/../bin/libbuddylookup*.dll \ + $(DESTDIR)$(pluginsdir)/. + rm -f $(DESTDIR)$(pluginsdir)/*.la + rm -f $(DESTDIR)$(pluginsdir)/*.dll.a +endif diff --git a/linphone/coreapi/sipsetup.c b/linphone/coreapi/sipsetup.c index e8b12e9ed..5dd63fe90 100644 --- a/linphone/coreapi/sipsetup.c +++ b/linphone/coreapi/sipsetup.c @@ -23,14 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "linphonecore.h" -#ifndef LINPHONE_PLUGINS_DIR -#ifdef WIN32 -#define LINPHONE_PLUGINS_DIR "liblinphone\\plugins\\" -#else -#define LINPHONE_PLUGINS_DIR "." -#endif -#endif - static SipSetup *all_sip_setups[]={ NULL }; diff --git a/linphone/gtk-glade/Makefile.am b/linphone/gtk-glade/Makefile.am index bb5da6db3..e75b5977c 100644 --- a/linphone/gtk-glade/Makefile.am +++ b/linphone/gtk-glade/Makefile.am @@ -45,9 +45,10 @@ linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \ if BUILD_WIN32 linphone_3_LDADD+=-lwininet -endif - +linphone_3_LDFLAGS=-Wl,--export-all-symbols +else linphone_3_LDFLAGS=-export-dynamic +endif gladedir=$(datadir)/linphone glade_DATA=$(GLADE_FILES) $(PIXMAPS) diff --git a/linphone/gtk-glade/linphone.h b/linphone/gtk-glade/linphone.h index c330138f3..755de2f22 100644 --- a/linphone/gtk-glade/linphone.h +++ b/linphone/gtk-glade/linphone.h @@ -19,13 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef HAVE_CONFIG_H #include "config.h" -#else -#define PACKAGE_DATA_DIR "./" - -#ifndef LINPHONE_VERSION -#define LINPHONE_VERSION "3.1.2-20090520" -#endif - #endif #include diff --git a/linphone/gtk-glade/main.c b/linphone/gtk-glade/main.c index 319ff89f4..1cb43ee23 100644 --- a/linphone/gtk-glade/main.c +++ b/linphone/gtk-glade/main.c @@ -31,14 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#ifndef GETTEXT_PACKAGE -#define GETTEXT_PACKAGE "linphone" -#endif - -#ifndef PACKAGE_LOCALE_DIR -#define PACKAGE_LOCALE_DIR "share/locale/" -#endif - #define LINPHONE_ICON "linphone2.png" const char *this_program_ident_string="linphone_ident_string=" LINPHONE_VERSION; diff --git a/linphone/mediastreamer2/mediastreamer.pc.in b/linphone/mediastreamer2/mediastreamer.pc.in index e2c6106ef..0975db025 100644 --- a/linphone/mediastreamer2/mediastreamer.pc.in +++ b/linphone/mediastreamer2/mediastreamer.pc.in @@ -5,7 +5,7 @@ includedir=@includedir@ Name: mediastreamer Description: A mediastreaming library for telephony applications -Depends: ortp +Requires: ortp Version: @MEDIASTREAMER_VERSION@ Libs: -L@libdir@ -lmediastreamer Cflags: -I@includedir@ diff --git a/linphone/share/Makefile.inc b/linphone/share/Makefile.inc index 7deb66aae..47c01785f 100644 --- a/linphone/share/Makefile.inc +++ b/linphone/share/Makefile.inc @@ -14,7 +14,7 @@ $(linphone_help)/manual.html: sgmltools $(srcdir)/manual.sgml install-data-local: - $(mkdir_p) $(DESTDIR)/$(linphone_manualdir) + $(mkdir_p) $(DESTDIR)$(linphone_manualdir) -cp -f $(linphone_help)/*.html $(DESTDIR)/$(linphone_manualdir)/. -cp -f $(linphone_help)/*.css $(DESTDIR)/$(linphone_manualdir)/. diff --git a/linphone/share/linphone.pc.in b/linphone/share/linphone.pc.in index abd76f414..f44eb2322 100644 --- a/linphone/share/linphone.pc.in +++ b/linphone/share/linphone.pc.in @@ -3,7 +3,7 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ - +Requires: mediastreamer ortp Name: liblinphone Description: All in one linphone libs. Version: @VERSION@