Add first support for Windows and fix many other config stuff
Thanks to vtorri for this patch
This commit is contained in:
parent
7337672562
commit
92457031ee
|
@ -11,11 +11,13 @@ Makefile.in
|
|||
.*.sw[po]
|
||||
*.gcov
|
||||
*.gcno
|
||||
*.exe
|
||||
/README
|
||||
/aclocal.m4
|
||||
/autom4te.cache/
|
||||
/config.cache
|
||||
/config.guess
|
||||
config.h.in~
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
|
|
|
@ -3,6 +3,7 @@ MAINTAINERCLEANFILES = \
|
|||
Makefile.in \
|
||||
aclocal.m4 \
|
||||
config.guess \
|
||||
config.h.in~ \
|
||||
config.h.in \
|
||||
config.sub \
|
||||
configure \
|
||||
|
|
34
configure.ac
34
configure.ac
|
@ -4,25 +4,27 @@ AC_INIT([exactness], [0.1.0], [enlightenment-devel@lists.sourceforge.net])
|
|||
AC_PREREQ([2.52])
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
case "$host_os" in
|
||||
mingw*)
|
||||
have_win32="yes"
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_ISC_POSIX
|
||||
AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
|
||||
AM_PROG_CC_C_O
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
EFL_ENABLE_BETA_API_SUPPORT
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
AC_PROG_LIBTOOL
|
||||
LT_INIT([win32-dll])
|
||||
|
||||
dnl Checking for __attribute__ support
|
||||
AC_MSG_CHECKING([for __attribute__])
|
||||
|
@ -39,18 +41,24 @@ if test "x${_cv_have___attribute__}" = "xyes" ; then
|
|||
fi
|
||||
AC_MSG_RESULT([${_cv_have___attribute__}])
|
||||
|
||||
requirements_pc="elementary >= 1.14.0 emile >= 1.14.0 ecore-evas >= 1.14.0 evas >= 1.14.0 ecore-con >= 1.14.0 ecore-file >= 1.14.0 ecore >= 1.14.0 eet >= 1.14.0 eo >= 1.14.0 eina >= 1.14.0"
|
||||
if test "x${have_win32}" = "xyes" ; then
|
||||
requirements_pc="${requirements_pc} evil"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES([EFL],
|
||||
[
|
||||
elementary >= 0.7.0
|
||||
emile >= 1.14.0
|
||||
],
|
||||
[ac_elm_themes_dir=`pkg-config --variable=themes elementary`]
|
||||
[${requirements_pc}],
|
||||
[ac_elm_themes_dir=`$PKG_CONFIG --variable=themes elementary`]
|
||||
)
|
||||
|
||||
if test "x$ac_elm_themes_dir" = x ; then
|
||||
AC_MSG_ERROR([couldn't find Elementary themes path])
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([sys/sysinfo.h])
|
||||
|
||||
AC_SUBST([requirements_pc])
|
||||
|
||||
AC_SUBST(ELM_THEMES_DIR, $ac_elm_themes_dir)
|
||||
|
||||
AC_OUTPUT([
|
||||
|
|
|
@ -6,5 +6,6 @@ includedir=@includedir@
|
|||
Name: Exactness
|
||||
Description: A Library to read and write Exactness units
|
||||
Version: @VERSION@
|
||||
Requires.private: @requirements_pc@
|
||||
Libs: -L${libdir} -lexactness
|
||||
Cflags: -I${includedir}/exactness
|
||||
|
|
|
@ -19,15 +19,15 @@ exactness_record_SOURCES = recorder.c
|
|||
|
||||
exactness_inject_SOURCES = injector.c
|
||||
|
||||
exactness_LDADD = @EFL_LIBS@ $(top_srcdir)/src/lib/.libs/libexactness.la
|
||||
exactness_LDADD = @EFL_LIBS@ $(top_builddir)/src/lib/libexactness.la
|
||||
|
||||
exactness_inspect_LDADD = @EFL_LIBS@ $(top_srcdir)/src/lib/.libs/libexactness.a
|
||||
exactness_inspect_LDADD = @EFL_LIBS@ $(top_builddir)/src/lib/libexactness.la
|
||||
|
||||
exactness_play_LDADD = @EFL_LIBS@ $(top_srcdir)/src/lib/.libs/libexactness.a
|
||||
exactness_play_LDADD = @EFL_LIBS@ $(top_builddir)/src/lib/libexactness.la
|
||||
|
||||
exactness_record_LDADD = @EFL_LIBS@ $(top_srcdir)/src/lib/.libs/libexactness.a
|
||||
exactness_record_LDADD = @EFL_LIBS@ $(top_builddir)/src/lib/libexactness.la
|
||||
|
||||
exactness_inject_LDADD = @EFL_LIBS@ $(top_srcdir)/src/lib/.libs/libexactness.a
|
||||
exactness_inject_LDADD = @EFL_LIBS@ $(top_builddir)/src/lib/libexactness.la
|
||||
|
||||
exactness_CFLAGS = @EFL_CFLAGS@ -I$(top_srcdir)/src/lib
|
||||
|
||||
|
@ -39,3 +39,4 @@ exactness_record_CFLAGS = @EFL_CFLAGS@ -I$(top_srcdir)/src/lib
|
|||
|
||||
exactness_inject_CFLAGS = @EFL_CFLAGS@ -I$(top_srcdir)/src/lib
|
||||
|
||||
CLEANFILES = $(share_DATA)
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <Ecore.h>
|
||||
#include <Ecore_Evas.h>
|
||||
#include <Ecore_File.h>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#define _GNU_SOURCE 1
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
#ifndef EFL_EO_API_SUPPORT
|
||||
#define EFL_EO_API_SUPPORT
|
||||
#endif
|
||||
|
@ -13,6 +15,7 @@
|
|||
#include <Ecore.h>
|
||||
#include <Ecore_Getopt.h>
|
||||
#include <Elementary.h>
|
||||
|
||||
#include <Exactness.h>
|
||||
|
||||
#include "exactness_private.h"
|
||||
|
@ -50,7 +53,7 @@ foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
|
|||
return EINA_TRUE; \
|
||||
}
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
#define SWAP_64(x) x
|
||||
#define SWAP_32(x) x
|
||||
#define SWAP_16(x) x
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifndef EFL_BETA_API_SUPPORT
|
||||
#define EFL_BETA_API_SUPPORT
|
||||
#endif
|
||||
|
@ -11,6 +15,7 @@
|
|||
#include <Exactness.h>
|
||||
|
||||
#include "exactness_private.h"
|
||||
|
||||
#define LDIFF(x) "<b><color=#F0F>"#x"</color></b>"
|
||||
#define RDIFF(x) "<b><color=#0FF>"#x"</color></b>"
|
||||
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
#define _GNU_SOURCE 1
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define _POSIX_
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <dlfcn.h>
|
||||
#ifdef HAVE_SYS_SYSINFO_H
|
||||
# include <sys/sysinfo.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#ifndef EFL_EO_API_SUPPORT
|
||||
#define EFL_EO_API_SUPPORT
|
||||
#endif
|
||||
|
@ -24,7 +29,7 @@
|
|||
|
||||
#include "exactness_private.h"
|
||||
|
||||
#define MAX_PATH 1024
|
||||
#define PATH_ 1024
|
||||
#define IMAGE_FILENAME_EXT ".png"
|
||||
|
||||
typedef struct
|
||||
|
@ -60,7 +65,7 @@ foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
|
|||
return EINA_TRUE; \
|
||||
}
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
#define SWAP_64(x) x
|
||||
#define SWAP_32(x) x
|
||||
#define SWAP_16(x) x
|
||||
|
@ -851,7 +856,7 @@ _prg_invoke(const char *full_path, int argc, char **argv)
|
|||
static Eina_Stringshare *
|
||||
_prg_full_path_guess(const char *prg)
|
||||
{
|
||||
char full_path[MAX_PATH];
|
||||
char full_path[PATH_];
|
||||
if (strchr(prg, '/')) return eina_stringshare_add(prg);
|
||||
char *paths = strdup(getenv("PATH"));
|
||||
Eina_Stringshare *ret = NULL;
|
||||
|
@ -1079,7 +1084,8 @@ int main(int argc, char **argv)
|
|||
memcpy(argv[0], argv[opt_args], len);
|
||||
memset(argv[0] + len, 0, _POSIX_PATH_MAX - len);
|
||||
|
||||
for (int i = opt_args; i < argc; i++)
|
||||
int i;
|
||||
for (i = opt_args; i < argc; i++)
|
||||
{
|
||||
if (i != opt_args)
|
||||
{
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
#define _GNU_SOURCE 1
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#define _POSIX_
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <dlfcn.h>
|
||||
#ifdef HAVE_SYS_SYSINFO_H
|
||||
# include <sys/sysinfo.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#ifndef EFL_EO_API_SUPPORT
|
||||
#define EFL_EO_API_SUPPORT
|
||||
#endif
|
||||
|
@ -22,7 +27,7 @@
|
|||
#include <Elementary.h>
|
||||
#include <Exactness.h>
|
||||
|
||||
#include "exactness_private.h"
|
||||
#include <exactness_private.h>
|
||||
|
||||
#define MAX_PATH 1024
|
||||
#define STABILIZE_KEY_STR "F1"
|
||||
|
@ -464,7 +469,8 @@ int main(int argc, char **argv)
|
|||
memcpy(argv[0], argv[opt_args], len);
|
||||
memset(argv[0] + len, 0, _POSIX_PATH_MAX - len);
|
||||
|
||||
for (int i = opt_args; i < argc; i++)
|
||||
int i;
|
||||
for (i = opt_args; i < argc; i++)
|
||||
{
|
||||
if (i != opt_args)
|
||||
{
|
||||
|
|
|
@ -245,4 +245,5 @@ EAPI Exactness_Unit *legacy_rec_file_read(const char *filename);
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* _EXACTNESS_H */
|
||||
|
|
|
@ -8,16 +8,13 @@ AM_CPPFLAGS = \
|
|||
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
|
||||
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
@EFL_CFLAGS@
|
||||
|
||||
EXTRA_DIST = \
|
||||
exactness_private.h
|
||||
@EFL_CFLAGS@ \
|
||||
-DEXACTNESS_BUILD
|
||||
|
||||
pkgdir = $(libdir)
|
||||
pkg_LTLIBRARIES = libexactness.la
|
||||
|
||||
libexactness_la_SOURCES = unit.c legacy_file.c
|
||||
libexactness_la_LDFLAGS = -fPIC -rdynamic
|
||||
libexactness_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
libexactness_la_SOURCES = unit.c legacy_file.c exactness_private.h
|
||||
libexactness_la_LDFLAGS = -fPIC -rdynamic -no-undefined
|
||||
libexactness_la_LIBADD = @EFL_LIBS@
|
||||
libexactness_la_CFLAGS = @EFL_CFLAGS@
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <Exactness.h>
|
||||
|
||||
/* private header */
|
||||
const char *_exactness_action_type_to_string_get(Exactness_Action_Type type);
|
||||
EAPI const char *_exactness_action_type_to_string_get(Exactness_Action_Type type);
|
||||
|
||||
#define SHOT_DELIMITER '+'
|
||||
#endif
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
#include <Eina.h>
|
||||
#include <Eet.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Eet.h>
|
||||
#include <Evas.h>
|
||||
#include <Exactness.h>
|
||||
|
||||
#include "Exactness.h"
|
||||
|
||||
#define CACHE_FILE_ENTRY "cache"
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <Eet.h>
|
||||
#include <Exactness.h>
|
||||
|
||||
#include "Exactness.h"
|
||||
#include "exactness_private.h"
|
||||
|
||||
typedef struct _Dummy
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue