autoconf trouble
Enrico Weigelt
weigelt at metux.de
Mon Sep 12 09:47:41 PDT 2005
... probably forgot to attach the patch ... so here it is.
cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact at metux.de
---------------------------------------------------------------------
Realtime Forex/Stock Exchange trading powered by postgresSQL :))
http://www.fxignal.net/
---------------------------------------------------------------------
-------------- next part --------------
diff -ruN libXtrans-0.1.orig/build.inf libXtrans-0.1/build.inf
--- libXtrans-0.1.orig/build.inf 1970-01-01 01:00:00.000000000 +0100
+++ libXtrans-0.1/build.inf 2005-09-12 15:52:55.000000000 +0200
@@ -0,0 +1,21 @@
+style: library-plain-1.0
+package-name: libXtrans
+package-version: 0.1.0.0
+package-maintainer: keithp at keithp.com
+description: Abstract network code for X
+library-name: xtrans
+include-prefix: X11/Xtrans
+include-file: Xtrans.h
+include-file: Xtrans.c
+include-file: Xtransdef.h
+include-file: Xtransdnet.c
+include-file: Xtransint.h
+include-file: Xtranslcl.c
+include-file: Xtransos2.c
+include-file: Xtranssock.c
+include-file: Xtranstli.c
+include-file: Xtransutil.c
+include-file: transport.c
+
+## this stuff is maybe optional, because can be defined via package-name
+config-header: Xtransdef.h
diff -ruN libXtrans-0.1.orig/in/configure.ac libXtrans-0.1/in/configure.ac
--- libXtrans-0.1.orig/in/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ libXtrans-0.1/in/configure.ac 2005-09-12 15:40:01.000000000 +0200
@@ -0,0 +1,48 @@
+dnl
+dnl $Id: configure.ac,v 3.3 2003/10/29 06:07:48 anholt Exp $
+dnl
+dnl Copyright ?? 2003 Keith Packard, Noah Levitt
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.57])
+AC_INIT(%PACKAGE-NAME%, %PACKAGE-VERSION%, [%PACKAGE-MAINTAINER%], %PACKAGE-NAME%)
+AM_INIT_AUTOMAKE([dist-bzip2])
+AM_MAINTAINER_MODE
+
+AM_CONFIG_HEADER(%CONFIG-HEADER%)
+
+AC_CHECK_FUNCS(fchown ptsname)
+
+AC_CHECK_HEADERS(tiuser.h un.h sys/un.h netinet/in.h netdnet/dn.h)
+
+AC_DEFINE(HAVE_STICKY_DIR_BIT, 1, [System supports stick-bit for directories])
+
+AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
+ [AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN,1,[whether sockaddr_in struct has sin_len])],
+ [],
+ [
+#include <netinet/in.h>
+])
+
+AC_OUTPUT([Makefile
+ xtrans.pc])
+
diff -ruN libXtrans-0.1.orig/in/Makefile.am libXtrans-0.1/in/Makefile.am
--- libXtrans-0.1.orig/in/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ libXtrans-0.1/in/Makefile.am 2005-09-12 15:57:22.000000000 +0200
@@ -0,0 +1,7 @@
+Xtransincludedir = $(includedir)%INCLUDE-PREFIX%
+Xtransinclude_HEADERS = %INCLUDE-FILES%
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = %LIBRARY-NAME%.pc
+
+EXTRA_DIST = %LIBRARY-NAME%.pc.in
diff -ruN libXtrans-0.1.orig/in/xtrans.pc.in libXtrans-0.1/in/xtrans.pc.in
--- libXtrans-0.1.orig/in/xtrans.pc.in 1970-01-01 01:00:00.000000000 +0100
+++ libXtrans-0.1/in/xtrans.pc.in 2005-09-12 15:53:14.000000000 +0200
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+%LIBRARY-NAME%includedir=@includedir@/%INCLUDE-PREFIX%
+
+Name: %PACKAGE-NAME%
+Description: %DESCRIPTION%
+Version: @PACKAGE_VERSION@
+Cflags: -I${%LIBRARY-NAME%includedir} -I${includedir}
diff -ruN libXtrans-0.1.orig/prepare-am libXtrans-0.1/prepare-am
--- libXtrans-0.1.orig/prepare-am 1970-01-01 01:00:00.000000000 +0100
+++ libXtrans-0.1/prepare-am 2005-09-12 15:58:49.000000000 +0200
@@ -0,0 +1,89 @@
+#!/usr/bin/perl
+
+# ------------------ build info loading / parsing ------------------
+open ( BUILDFILE, "build.inf" );
+while (<BUILDFILE>)
+{
+ s/\#.*//;
+ chop($_);
+ if ($_)
+ {
+ ($name, $value) = split(':', $_);
+ $name = trim($name);
+ $value= trim($value);
+
+ if ($name eq "include-file") { $DEF_include_files .= " ".$value; }
+ elsif ($name eq "package-name") { $DEF_package_name = $value; }
+ elsif ($name eq "config-header") { $DEF_config_header = $value; }
+ elsif ($name eq "package-version") { $DEF_package_version = $value; }
+ elsif ($name eq "description") { $DEF_description = $value; }
+ elsif ($name eq "library-name") { $DEF_library_name = $value; }
+ elsif ($name eq "include-prefix") { $DEF_include_prefix = $value; }
+ elsif ($name eq "package-maintainer") { $DEF_package_maintainer = $value; }
+ elsif ($name eq "style")
+ {
+ if ($value eq "library-plain-1.0")
+ {
+ print "Using style: $value\n";
+ }
+ else
+ {
+ print "Unsupported style: $value\n";
+ }
+ }
+ else
+ {
+ print "WARN: unhandled variable: $name = $value\n";
+ }
+ }
+}
+
+## some sanity checks and fixes
+
+die("missing package name") if (!$DEF_package_name);
+die("missing library name") if (!$DEF_library_name);
+die("missing maintainer") if (!$DEF_package_maintainer);
+die("missing config-header") if (!$DEF_config_header);
+die("missing description") if (!$DEF_description);
+
+$DEF_include_prefix = trim($DEF_include_prefix);
+
+## generate configure.ac
+generate_file("configure.ac");
+generate_file("Makefile.am");
+generate_file("$DEF_library_name.pc.in");
+
+### some helper stuff
+sub generate_file()
+{
+ my $name = shift;
+ $srcname = "in/".$name;
+
+ print "processing output file: $name ($srcname)\n";
+
+ open ( OUT, ">$name" );
+ open ( IN, $srcname );
+
+ while (<IN>)
+ {
+ s/\%PACKAGE\-NAME\%/$DEF_package_name/g;
+ s/\%PACKAGE\-VERSION\%/$DEF_package_version/g;
+ s/\%PACKAGE\-MAINTAINER\%/$DEF_package_maintainer/g;
+ s/\%CONFIG-HEADER\%/$DEF_config_header/g;
+ s/\%INCLUDE-PREFIX\%/$DEF_include_prefix/g;
+ s/\%INCLUDE-FILES\%/$DEF_include_files/g;
+ s/\%LIBRARY-NAME\%/$DEF_library_name/g;
+ s/\%DESCRIPTION\%/$DEF_description/g;
+ print OUT $_;
+ }
+ close(IN);
+ close(OUT);
+}
+
+sub trim()
+{
+ my $string = shift;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ return $string;
+}
More information about the xorg-modular
mailing list