[PATCH 0/3] mingw: updated support

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/3] mingw: updated support

Carlo Marcelo Arenas Belon
The following series updates the mingw32 build to support searchpath
and enables the use of make if available through msys or a linux
based mingw crosscompiler.

  [PATCH 1/3] mingw: FTBS after searchpath support
  [PATCH 2/3] build: avoid ignoring a Makefile in mingw32 if available
  [PATCH 3/3] mingw: add support for a make file
 
tested with Fedora 13 mingw environment but expected to work everywhere
else as well.

Carlo

_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/3] mingw: FTBS after searchpath support

Carlo Marcelo Arenas Belon
searchpath added a dependency in <sys/stat.h> that need to be accounted
for so that libconfuse will build again with mingw32

Signed-off-by: Carlo Marcelo Arenas Belon <[hidden email]>
---
 windows/mingw/README.TXT |    3 --
 windows/mingw/build.bat  |    5 +--
 windows/mingw/config.h   |   85 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 86 insertions(+), 7 deletions(-)
 create mode 100644 windows/mingw/config.h

diff --git a/windows/mingw/README.TXT b/windows/mingw/README.TXT
index e661655..30435e1 100644
--- a/windows/mingw/README.TXT
+++ b/windows/mingw/README.TXT
@@ -20,9 +20,6 @@ directory and the compilation flags. Then, it runs the appropriate gcc
 commands to produce the object files. Finally, it uses the 'ar' command to
 produce the static library 'libconfuse.a'.
 
-There is no file 'config.h' in this directory because this is not necessary.
-The script uses the Borland one from directory "../borland" as is.
-
 Once you've built the library, you need only two files to add libConfuse to
 your project: 'confuse.h' located in the source directory and 'libconfuse.a'.
 
diff --git a/windows/mingw/build.bat b/windows/mingw/build.bat
index 6447bf5..935c585 100755
--- a/windows/mingw/build.bat
+++ b/windows/mingw/build.bat
@@ -9,9 +9,7 @@ echo.
 rem Source directory
 set SRC_DIR=..\..\src
 
-rem  The Borland "config.h" file can be used as is
-rem  by adding -DHAVE_STRCASECMP on the gcc command line.
-set INCLUDE=-I..\borland -I%SRC_DIR%
+set INCLUDE=-I. -I%SRC_DIR%
 set CFLAGS=-Wall -DHAVE_CONFIG_H -DHAVE_STRCASECMP %INCLUDE% -c
 
 set COMPILE=gcc %CFLAGS% %SRC_DIR%\confuse.c
@@ -41,4 +39,3 @@ echo.
 
 :end
 pause
-
diff --git a/windows/mingw/config.h b/windows/mingw/config.h
new file mode 100644
index 0000000..265e11f
--- /dev/null
+++ b/windows/mingw/config.h
@@ -0,0 +1,85 @@
+/* config.h. Handcraftad for Fedora MinGW 4.4.2-2.fc13. */
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+/*#undef ENABLE_NLS*/
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+/*#undef HAVE_DCGETTEXT*/
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/*#undef HAVE_DLFCN_H*/
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+/*#undef HAVE_GETTEXT*/
+
+/* Define if you have the iconv() function. */
+/*#undef HAVE_ICONV*/
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/*#undef HAVE_INTTYPES_H*/
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+/*#undef HAVE_STRINGS_H*/
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/*#undef HAVE_UNISTD_H*/
+
+/* Name of package */
+#define PACKAGE "confuse"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "[hidden email]"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libConfuse"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "libConfuse 2.7"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "confuse"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "2.7"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "2.7"
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+/*#undef YYTEXT_POINTER*/
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/*#undef const*/
+
+/* Define to 1 if you have the strndup function */
+/*#undef HAVE_STRNDUP */
--
1.7.1.1


_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/3] build: avoid ignoring a Makefile in mingw32 if available

Carlo Marcelo Arenas Belon
In reply to this post by Carlo Marcelo Arenas Belon
Signed-off-by: Carlo Marcelo Arenas Belon <[hidden email]>
---
 windows/mingw/.gitignore |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 windows/mingw/.gitignore

diff --git a/windows/mingw/.gitignore b/windows/mingw/.gitignore
new file mode 100644
index 0000000..2460008
--- /dev/null
+++ b/windows/mingw/.gitignore
@@ -0,0 +1 @@
+!Makefile
--
1.7.1.1


_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

[PATCH 3/3] mingw: add support for a make file

Carlo Marcelo Arenas Belon
In reply to this post by Carlo Marcelo Arenas Belon
uses the same instructions from README.TXT and ideal in crosscompiled
environments

Signed-off-by: Carlo Marcelo Arenas Belon <[hidden email]>
---
 windows/mingw/Makefile   |   15 +++++++++++++++
 windows/mingw/README.TXT |    4 +++-
 2 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 windows/mingw/Makefile

diff --git a/windows/mingw/Makefile b/windows/mingw/Makefile
new file mode 100644
index 0000000..61c3131
--- /dev/null
+++ b/windows/mingw/Makefile
@@ -0,0 +1,15 @@
+CC=i686-pc-mingw32-gcc
+AR=i686-pc-mingw32-ar
+SRCDIR=../../src
+VPATH=$(SRCDIR)
+INCLUDE=-I. -I$(SRCDIR)
+CFLAGS=-Wall -DHAVE_CONFIG_H $(INCLUDE)
+ARFLAGS=rc
+
+all: libconfuse.a
+
+libconfuse.a: confuse.o lexer.o
+ $(AR) $(ARFLAGS) $@ $^
+
+clean:
+ rm -f *.o *.a
diff --git a/windows/mingw/README.TXT b/windows/mingw/README.TXT
index 30435e1..f810547 100644
--- a/windows/mingw/README.TXT
+++ b/windows/mingw/README.TXT
@@ -7,9 +7,11 @@ Compilation of the static library with MinGW.
 1) In order to build the library successfully, you should first check that the
    MinGW 'bin' directory is in the PATH environment variable.
 
-2) Then, launch the script 'build.bat' to produce 'libconfuse.a'.
+2) Then, if running in Windows launch the script 'build.bat' to produce
+   'libconfuse.a' or if crosscompiling just run ming32-make
 
 This script has been tested with MinGW 3.1.0 under Windows 2000.
+The Makefile has been tested with MinGW 3.15.2 under Fedora 13.
 It should also work with other versions of MinGW and Windows.
 
 
--
1.7.1.1


_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel