forked from enlightenment/efl
* define EAPI on Windows according to the following scheme:
- if Eet is built: . if the shared lib is built, EAPI must be __declspec(dllexport) . if the static lib is built, EAPI must be empty - otherwise EAPI must be __declspec(dllimport) * move config.h from Eet_private.h to source files so that EAPI is correctly defined in Eet.h * add notes for compilation with cegcc and mingw32ce in INSTALL * add support for compilation with cegcc * add indentation information for vi * remove trailing spaces SVN revision: 33959
This commit is contained in:
parent
87a6db7703
commit
bb32035399
|
@ -2,9 +2,9 @@ COMPILING and INSTALLING:
|
|||
|
||||
If you got a official release tar archive do:
|
||||
./configure
|
||||
|
||||
|
||||
( otherwise if you got this from enlightenment cvs do: ./autogen.sh )
|
||||
|
||||
|
||||
Then to compile:
|
||||
make
|
||||
|
||||
|
@ -13,7 +13,29 @@ To install (run this as root, or the user who handles installs):
|
|||
|
||||
NOTE: You MUST make install Eet for it to run properly.
|
||||
|
||||
NOTE: for compilation with MinGW, fnmatch.h is probably missing.
|
||||
NOTE: For compilation with MinGW, fnmatch.h is probably missing.
|
||||
That file can be found here:
|
||||
http://www.koders.com/c/fid2B518462CB1EED3D4E31E271DB83CD1582F6EEBE.aspx
|
||||
It should be installed in the mingw include directory.
|
||||
|
||||
NOTE: For compilation with mingw32ce, run configure with the option
|
||||
|
||||
--host=arm-wince-mingw32ce
|
||||
|
||||
NOTE: For compilation with cegcc, you have to do the following steps:
|
||||
|
||||
1) After having run autogen.sh, add in config.sub file:
|
||||
|
||||
cegcc)
|
||||
basic_machine=arm-unknown
|
||||
os=-cegcc
|
||||
;;
|
||||
|
||||
after the mingw32ce case
|
||||
|
||||
2) in config.sub, add -cegcc* after -pe*. You should have a line like:
|
||||
| -cygwin* | -pe* | -cegcc* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
|
||||
3) run configure with the option
|
||||
|
||||
--host=arm-wince-cegcc
|
||||
|
|
|
@ -30,17 +30,30 @@ AC_SUBST(version_info)
|
|||
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
win32_libs=""
|
||||
WIN32_CFLAGS=""
|
||||
WIN32_LIBS=""
|
||||
create_shared_lib=""
|
||||
case "$host_os" in
|
||||
mingw|mingw32)
|
||||
PKG_CHECK_MODULES([EVIL], [evil])
|
||||
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
|
||||
win32_libs="-lws2_32"
|
||||
dnl needed for correct definition of EAPI
|
||||
AC_DEFINE(EFL_EET_BUILD, 1, [Define to mention that eet is built])
|
||||
WIN32_LIBS="-lws2_32"
|
||||
create_shared_lib="-no-undefined "
|
||||
;;
|
||||
cegcc)
|
||||
PKG_CHECK_MODULES([EVIL], [evil])
|
||||
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if evil package is installed])
|
||||
dnl needed for correct definition of EAPI
|
||||
AC_DEFINE(EFL_EET_BUILD, 1, [Define to mention that eet is built])
|
||||
WIN32_CFLAGS="-mwin32"
|
||||
WIN32_LIBS="-lws2"
|
||||
create_shared_lib="-no-undefined "
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(win32_libs)
|
||||
AC_SUBST(WIN32_CFLAGS)
|
||||
AC_SUBST(WIN32_LIBS)
|
||||
AC_SUBST(create_shared_lib)
|
||||
|
||||
AC_CHECK_HEADER(zlib.h,, AC_MSG_ERROR("Cannot find zlib.h. Make sure your CFLAGS environment variable contains include lines for the location of this file"))
|
||||
|
|
|
@ -4,14 +4,19 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#ifdef EAPI
|
||||
#undef EAPI
|
||||
# undef EAPI
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef DLL_EXPORT
|
||||
# define EAPI __declspec(dllexport)
|
||||
# ifdef EFL_EET_BUILD
|
||||
# ifdef DLL_EXPORT
|
||||
# define EAPI __declspec(dllexport)
|
||||
# else
|
||||
# define EAPI
|
||||
# endif /* ! DLL_EXPORT */
|
||||
# else
|
||||
# define EAPI __declspec(dllimport)
|
||||
# endif
|
||||
# endif /* ! EFL_EET_BUILD */
|
||||
#else
|
||||
# ifdef __GNUC__
|
||||
# if __GNUC__ >= 4
|
||||
|
@ -22,7 +27,7 @@
|
|||
# else
|
||||
# define EAPI
|
||||
# endif
|
||||
#endif
|
||||
#endif /* ! _WIN32 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifndef _EET_PRIVATE_H
|
||||
#define _EET_PRIVATE_H
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
|
|
|
@ -7,6 +7,7 @@ AM_CPPFLAGS = \
|
|||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
@WIN32_CFLAGS@ \
|
||||
@EVIL_CFLAGS@
|
||||
|
||||
lib_LTLIBRARIES = libeet.la
|
||||
|
@ -20,6 +21,6 @@ eet_dictionary.c \
|
|||
eet_utils.c \
|
||||
Eet_private.h
|
||||
|
||||
libeet_la_LIBADD = @EVIL_LIBS@ -lz -ljpeg @fnmatch_libs@ @win32_libs@ -lm
|
||||
libeet_la_LIBADD = @EVIL_LIBS@ @WIN32_LIBS@ -lz -ljpeg @fnmatch_libs@ -lm
|
||||
libeet_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
libeet_la_LDFLAGS = @create_shared_lib@ -version-info @version_info@
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h> /* so that EAPI in Eet.h is correctly defined */
|
||||
#endif
|
||||
|
||||
#include "Eet.h"
|
||||
#include "Eet_private.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h> /* so that EAPI in Eet.h is correctly defined */
|
||||
#endif
|
||||
|
||||
#include "Eet.h"
|
||||
#include "Eet_private.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h> /* so that EAPI in Eet.h is correctly defined */
|
||||
#endif
|
||||
|
||||
#include "Eet.h"
|
||||
#include "Eet_private.h"
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h> /* so that EAPI in Eet.h is correctly defined */
|
||||
#endif
|
||||
|
||||
#include "Eet.h"
|
||||
#include "Eet_private.h"
|
||||
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h> /* so that EAPI in Eet.h is correctly defined */
|
||||
#endif
|
||||
|
||||
#include "Eet.h"
|
||||
#include "Eet_private.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
|
@ -7,7 +11,7 @@ _eet_hash_gen(const char *key, int hash_size)
|
|||
int hash_num = 0;
|
||||
int value, i;
|
||||
unsigned char *ptr;
|
||||
|
||||
|
||||
const int masks[9] =
|
||||
{
|
||||
0x00,
|
||||
|
@ -20,10 +24,10 @@ _eet_hash_gen(const char *key, int hash_size)
|
|||
0x7f,
|
||||
0xff
|
||||
};
|
||||
|
||||
|
||||
/* no string - index 0 */
|
||||
if (!key) return 0;
|
||||
|
||||
|
||||
/* calc hash num */
|
||||
for (i = 0, ptr = (unsigned char *)key, value = (int)(*ptr);
|
||||
value;
|
||||
|
|
Loading…
Reference in New Issue