- 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
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/eet@33959
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
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
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
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"))
#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
# else
# define EAPI
# endif
-#endif
+#endif /* ! _WIN32 */
#ifdef __cplusplus
extern "C" {
+/*
+ * 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>
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
+@WIN32_CFLAGS@ \
@EVIL_CFLAGS@
lib_LTLIBRARIES = libeet.la
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@
+/*
+ * 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"
+/*
+ * 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"
+/*
+ * 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"
* 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"
+/*
+ * 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"
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
#include <stdio.h>
#include <math.h>
int hash_num = 0;
int value, i;
unsigned char *ptr;
-
+
const int masks[9] =
{
0x00,
0x7f,
0xff
};
-
+
/* no string - index 0 */
if (!key) return 0;
-
+
/* calc hash num */
for (i = 0, ptr = (unsigned char *)key, value = (int)(*ptr);
value;