From f20455158737bf1a252c721d54cd8f406441e527 Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Wed, 14 Jan 1998 21:10:19 +0100
Subject: [PATCH] begun Image.JPEG

Rev: src/modules/_Image_JPEG/Makefile.in:1.1
Rev: src/modules/_Image_JPEG/acconfig.h:1.1
Rev: src/modules/_Image_JPEG/config.h.in:1.1
Rev: src/modules/_Image_JPEG/configure.in:1.1
Rev: src/modules/_Image_JPEG/image_jpeg.c:1.1
Rev: src/modules/_Image_JPEG/stamp-h.in:1.1
Rev: src/modules/_Image_JPEG/testsuite.in:1.1
---
 .gitattributes                       |  2 ++
 src/modules/_Image_JPEG/Makefile.in  |  7 +++++++
 src/modules/_Image_JPEG/acconfig.h   | 14 ++++++++++++++
 src/modules/_Image_JPEG/config.h.in  | 16 ++++++++++++++++
 src/modules/_Image_JPEG/configure.in | 20 ++++++++++++++++++++
 src/modules/_Image_JPEG/image_jpeg.c | 25 +++++++++++++++++++++++++
 src/modules/_Image_JPEG/stamp-h.in   |  1 +
 src/modules/_Image_JPEG/testsuite.in |  3 +++
 8 files changed, 88 insertions(+)
 create mode 100644 src/modules/_Image_JPEG/Makefile.in
 create mode 100644 src/modules/_Image_JPEG/acconfig.h
 create mode 100644 src/modules/_Image_JPEG/config.h.in
 create mode 100644 src/modules/_Image_JPEG/configure.in
 create mode 100644 src/modules/_Image_JPEG/image_jpeg.c
 create mode 100644 src/modules/_Image_JPEG/stamp-h.in
 create mode 100644 src/modules/_Image_JPEG/testsuite.in

diff --git a/.gitattributes b/.gitattributes
index 9ae0755b80..b4c3841e87 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -160,6 +160,8 @@ testfont binary
 /src/modules/_Crypto/pipe.c foreign_ident
 /src/modules/_Crypto/rc4.c foreign_ident
 /src/modules/_Crypto/test_crypto.pike foreign_ident
+/src/modules/_Image_JPEG/acconfig.h foreign_ident
+/src/modules/_Image_JPEG/config.h.in foreign_ident
 /src/modules/call_out/call_out.c foreign_ident
 /src/modules/call_out/test_co.pike foreign_ident
 /src/modules/dynamic_module_makefile.in foreign_ident
diff --git a/src/modules/_Image_JPEG/Makefile.in b/src/modules/_Image_JPEG/Makefile.in
new file mode 100644
index 0000000000..0442dfeec3
--- /dev/null
+++ b/src/modules/_Image_JPEG/Makefile.in
@@ -0,0 +1,7 @@
+SRCDIR=@srcdir@
+VPATH=@srcdir@:@srcdir@/../..:../..
+OBJS=image_jpeg.o
+MODULE_LDFLAGS=@LDFLAGS@ @LIBS@
+
+@dynamic_module_makefile@
+@dependencies@
diff --git a/src/modules/_Image_JPEG/acconfig.h b/src/modules/_Image_JPEG/acconfig.h
new file mode 100644
index 0000000000..bebbe966cb
--- /dev/null
+++ b/src/modules/_Image_JPEG/acconfig.h
@@ -0,0 +1,14 @@
+/*
+ * $Id: acconfig.h,v 1.1 1998/01/14 20:10:15 mirar Exp $
+ */
+
+#ifndef GMP_MACHINE_H
+#define GMP_MACHINE_H
+
+@TOP@
+@BOTTOM@
+
+/* Define this if you have -ljpeg */
+#undef HAVE_LIBJPEG
+
+#endif
diff --git a/src/modules/_Image_JPEG/config.h.in b/src/modules/_Image_JPEG/config.h.in
new file mode 100644
index 0000000000..59cee19607
--- /dev/null
+++ b/src/modules/_Image_JPEG/config.h.in
@@ -0,0 +1,16 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+/*
+ * $Id: config.h.in,v 1.1 1998/01/14 20:10:16 mirar Exp $
+ */
+
+#ifndef GMP_MACHINE_H
+#define GMP_MACHINE_H
+
+
+/* Define if you have the <jpeglib.h> header file.  */
+#undef HAVE_JPEGLIB_H
+
+/* Define if you have the jpeg library (-ljpeg).  */
+#undef HAVE_LIBJPEG
+
+#endif
diff --git a/src/modules/_Image_JPEG/configure.in b/src/modules/_Image_JPEG/configure.in
new file mode 100644
index 0000000000..e8886756d4
--- /dev/null
+++ b/src/modules/_Image_JPEG/configure.in
@@ -0,0 +1,20 @@
+AC_INIT(image_jpeg.c)
+AC_CONFIG_HEADER(config.h)
+AC_ARG_WITH(jpeglib,     [  --with(out)-jpeglib       Support JPEG (Image.JPEG)],[],[with_jpeglib=yes])
+
+sinclude(../module_configure.in)
+
+if test x$with_jpeglib = xyes ; then
+  AC_CHECK_HEADERS(jpeglib.h)
+  if test $ac_cv_header_jpeglib_h = yes ; then
+    AC_CHECK_LIB(jpeg, jpeg_destroy, [
+      AC_DEFINE(HAVE_LIBJPEG) 
+      LIBS="${LIBS-} -lz"
+      ], 
+      AC_CHECK_LIB(jpeg, jpeg_destroy))
+  fi
+fi
+
+AC_OUTPUT(Makefile,echo FOO >stamp-h )
+
+
diff --git a/src/modules/_Image_JPEG/image_jpeg.c b/src/modules/_Image_JPEG/image_jpeg.c
new file mode 100644
index 0000000000..0337f2ef6f
--- /dev/null
+++ b/src/modules/_Image_JPEG/image_jpeg.c
@@ -0,0 +1,25 @@
+#include "global.h"
+RCSID("$id: $");
+
+#include "config.h"
+
+#if !defined(HAVE_LIBJPEG)
+#undef HAVE_JPEGLIB_H
+#endif
+
+#ifdef HAVE_JPEGLIB_H
+
+
+
+#endif /* HAVE_JPEGLIB_H */
+
+
+void pike_module_exit(void)
+{
+}
+
+void pike_module_init(void)
+{
+#ifdef HAVE_JPEGLIB_H
+#endif /* HAVE_JPEGLIB_H */
+}
diff --git a/src/modules/_Image_JPEG/stamp-h.in b/src/modules/_Image_JPEG/stamp-h.in
new file mode 100644
index 0000000000..257cc5642c
--- /dev/null
+++ b/src/modules/_Image_JPEG/stamp-h.in
@@ -0,0 +1 @@
+foo
diff --git a/src/modules/_Image_JPEG/testsuite.in b/src/modules/_Image_JPEG/testsuite.in
new file mode 100644
index 0000000000..235283e0f8
--- /dev/null
+++ b/src/modules/_Image_JPEG/testsuite.in
@@ -0,0 +1,3 @@
+cond([[ master()->resolv("_Image_JPEG")->encode ]],
+[[
+]])
-- 
GitLab