diff -NaubB ./make-3.81/aclocal.m4 ./make-3.81g/aclocal.m4
--- ./make-3.81/aclocal.m4	2006-04-01 03:39:56.000000000 -0300
+++ ./make-3.81g/aclocal.m4	2007-12-12 20:16:23.000000000 -0300
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.2 -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -11,11 +11,23 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#                                                        -*- Autoconf -*-
+# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Generated from amversion.in; do not edit by hand.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
@@ -28,15 +40,26 @@
 # Call AM_AUTOMAKE_VERSION so it can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-	 [AM_AUTOMAKE_VERSION([1.9.6])])
+	 [AM_AUTOMAKE_VERSION([1.9.2])])
 
-# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+# AM_AUX_DIR_EXPAND
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
 
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
@@ -85,14 +108,24 @@
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
 
-# serial 7
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 6
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -116,15 +149,26 @@
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
+# serial 7						-*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -274,14 +319,25 @@
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-#serial 3
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
@@ -341,14 +397,25 @@
 ])
 
 
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003
 # Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
 
 AC_DEFUN([AM_WITH_DMALLOC],
 [AC_MSG_CHECKING([if malloc debugging is wanted])
@@ -370,17 +437,28 @@
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
 
-# This macro actually does too much.  Some checks are only needed if
-# your package does certain things.  But this isn't really a big deal.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 11
 
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
@@ -482,27 +560,51 @@
 done
 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 install_sh=${install_sh-"$am_aux_dir/install-sh"}
 AC_SUBST(install_sh)])
 
-# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  Free Software Foundation, Inc.
 
-# serial 2
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
 
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
@@ -519,13 +621,24 @@
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
 
-# serial 3
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -569,17 +682,29 @@
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
+# serial 2
 
 # AM_PROG_CC_C_O
 # --------------
 # Like AC_PROG_CC_C_O, but changed for automake.
+
+# Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
 AC_DEFUN([AM_PROG_CC_C_O],
 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
@@ -597,16 +722,27 @@
 fi
 ])
 
-# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+#  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -632,16 +768,27 @@
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
 # AM_PROG_MKDIR_P
 # ---------------
 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
+
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
 # created by `make install' are always world readable, even if the
 # installer happens to have an overly restrictive umask (e.g. 077).
@@ -697,13 +844,24 @@
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
 
-# serial 3
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -728,14 +886,26 @@
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005
+
+# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
 # Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
 
 AC_DEFUN([AM_C_PROTOTYPES],
 [AC_REQUIRE([AC_C_PROTOTYPES])
@@ -753,16 +923,28 @@
 
 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
 
-# Check to make sure that the build environment is sane.    -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# Free Software Foundation, Inc.
 #
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
 
-# serial 4
+# serial 3
 
 # AM_SANITY_CHECK
 # ---------------
@@ -805,14 +987,25 @@
 fi
 AC_MSG_RESULT(yes)])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
 # AM_PROG_INSTALL_STRIP
-# ---------------------
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
 # One issue with vendor `install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
 # annoying in cross-compiling environments, where the build's strip
@@ -835,13 +1028,25 @@
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Copyright (C) 2004  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
 
-# serial 2
 
 # _AM_PROG_TAR(FORMAT)
 # --------------------
diff -NaubB ./make-3.81/available_rules2.c ./make-3.81g/available_rules2.c
--- ./make-3.81/available_rules2.c	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/available_rules2.c	2007-12-14 19:38:27.354927000 -0300
@@ -0,0 +1,264 @@
+#include <stdio.h>
+#include "plugin.h"
+
+const int LOG_LEVEL = 1;
+
+FILE* f;
+unsigned int level = 0;
+unsigned int rule_has_commands;
+
+/* plugin implementation */
+
+static void EnterDirectory (unsigned int makelevel, const char *directory);
+static void ExitDirectory  (void);
+static void ClosePlugin    (void);
+static void VarDefine      (const char* varname, const char* value, int origin);
+static void VarLookup      (const char* varname, const char* value, int origin);
+static void VarAppend      (const char* varname, const char* oldvalue, const char* appending, int origin);
+static void FuncCall       (const char* function);
+static void EnterMakefile  (const char* name, int flags);
+static void EnterRule      (int has_commands);
+static void RuleHeader     (const char* header);
+static void ExitRule       (void);
+static void ExitMakefile   (void);
+static void GoalSeek       (const char* goal);
+static void ProcessRuleIn  (const char* rule);
+static void ProcessRuleOut (void);
+static void CmdBefore      (const char* argv[], unsigned int argc, const char* env[], unsigned int envc);
+static void CmdAfter       (int sig, int ret);
+
+static void IfDefEval      (const char* target, const char* exp, int negated, int result);
+static void IfEqEval       (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result);
+
+
+
+static void TAB(void)
+{
+    int i;
+    for (i=0; i<level; i++)
+	fprintf(f, "\t");
+}
+
+/* Plugins shall implement the following function:
+*/
+void
+initialize_plugin (const char *argument, struct Plugin_data *data)
+{
+  data->enter_directory_callback = EnterDirectory;
+  data->exit_directory_callback = ExitDirectory;
+  data->close_plugin_callback = ClosePlugin;
+  /*
+  data->var_define_callback = VarDefine;
+  data->var_lookup_callback = VarLookup;
+  data->var_append_callback = VarAppend;
+  */
+  data->begin_makefile_callback = EnterMakefile;
+  data->begin_parse_rule = EnterRule;
+  data->parse_rule_header = RuleHeader;
+  data->end_parse_rule = ExitRule;
+  data->end_makefile_callback = ExitMakefile;
+
+/*
+  data->function_call_callback = FuncCall;
+    */
+  
+  /*data->goal_seek_callback = GoalSeek;*/
+  /*
+  data->rule_enter_callback = ProcessRuleIn;
+  data->rule_exit_callback = ProcessRuleOut;
+  
+  data->before_command_callback = CmdBefore;
+  data->after_command_callback = CmdAfter;
+
+  data->ifdef_eval_callback = IfDefEval;
+  data->ifeq_eval_callback = IfEqEval;
+    */
+  f = fopen("plugin.log", "wt");
+}
+
+
+static void
+EnterDirectory (unsigned int makelevel, const char *directory)
+{
+    if (level == LOG_LEVEL)
+    {
+  TAB();
+  fprintf (f, "Plugin: Entering dir %s, level %d\n", directory, makelevel);
+  /*level++;*/
+  }
+}
+
+static void
+ExitDirectory (void)
+{
+    if (level == LOG_LEVEL)
+    {
+  /*level--;*/
+  TAB();
+  fprintf (f, "Plugin: Exiting dir\n");
+  }
+}
+
+static void
+ClosePlugin ()
+{
+  fprintf (f, "Plugin: Closing\n");
+  fclose(f);
+}
+
+static void
+VarDefine (const char* varname, const char* value, int origin)
+{
+  TAB();
+  fprintf (f, "Plugin: %s = '%s' at %d\n", varname, value, origin);
+}
+
+static void
+VarLookup (const char* varname, const char* value, int origin)
+{
+  TAB();
+  if (value != 0)
+      fprintf (f, "Plugin: var lookup: %s = '%s' at %d\n", varname, value, origin);
+  else
+      fprintf (f, "Plugin: var %s lookup FAILED\n", varname);
+}
+
+static void
+VarAppend (const char* varname, const char* oldvalue, const char* appending, int origin)
+{
+  TAB();
+  fprintf (f, "Plugin: %s += '%s' at %d (old='%s')\n", varname, appending, origin, oldvalue);
+}
+
+static void
+FuncCall (const char* function)
+{
+  TAB();
+  fprintf (f, "Plugin: call to %s\n", function);
+}
+
+static void
+EnterMakefile  (const char* name, int flags)
+{
+    level++;
+    if (level == LOG_LEVEL)
+    {
+	TAB();
+	fprintf(f, "Plugin: enter makefile '%s' flags=%d\n", name, flags);
+	/*level++;*/
+    }
+}
+
+static void
+EnterRule (int has_commands)
+{
+    if (level == LOG_LEVEL)
+    {
+    TAB();
+    rule_has_commands = has_commands;
+    }
+}
+
+static void
+RuleHeader (const char* header)
+{
+    if (level == LOG_LEVEL)
+    {
+	if (strchr(header, ".") == NULL
+	    fprintf(f, "%s ", header);
+    }
+}
+
+static void
+ExitRule (void)
+{
+    if (level == LOG_LEVEL)
+    {
+    if (rule_has_commands)
+	fprintf(f, ": {}\n");
+    else
+	fprintf(f, ": {CMDS}\n");
+    }
+}
+
+static void
+ExitMakefile (void)
+{
+    if (level == LOG_LEVEL)
+    {
+    TAB();
+    fprintf(f, "Plugin: exit makefile\n");
+    /*level--;*/
+    }
+    level--;
+}
+
+static void
+ProcessRuleIn (const char* rule)
+{
+    TAB();
+    fprintf(f, "Plugin: processing rule '%s'\n", rule);
+    level++;
+}
+
+static void
+ProcessRuleOut (void)
+{
+    level--;
+    TAB();
+    fprintf(f, "Plugin: processing rule out\n");
+}
+
+
+static void
+CmdBefore (const char* argv[], unsigned int argc, const char* env[], unsigned int envc)
+{
+    unsigned int i;
+    TAB();
+    fprintf(f, "Plugin: before execute '%s'\n", argv[0]);
+    TAB();
+    fprintf(f, "\tARGS: ");
+    for(i=1; i<argc; i++)
+	fprintf(f, "%s ", argv[i]);
+    fprintf(f, "\n");
+#if 0
+    TAB();
+    fprintf(f, "\tENV: ");
+    for(i=0; i<envc; i++)
+	fprintf(f, "%s ", env[i]);
+    fprintf(f, "\n");
+#endif
+}
+
+static void
+CmdAfter (int sig, int ret)
+{
+    TAB();
+    if (sig != 0 || ret != 0)
+	fprintf(f, "Plugin: command failed, returned %d, sig %d\n", ret, sig);
+    else
+	fprintf(f, "Plugin: after execute, returned %d\n", ret);
+}
+
+static void
+IfDefEval (const char* target, const char* exp, int negated, int result)
+{
+    TAB();
+    fprintf(f, "%s %s (='%s') returned %s\n", 
+	(negated ? "IFNDEF" : "IFDEF"),
+	target, 
+	exp, 
+	(result ? "TRUE" : "FALSE"));
+}
+
+static void
+IfEqEval (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result)
+{
+    TAB();
+    fprintf(f, "%s %s == %s ('%s' == '%s') returned %s\n", 
+	(negated ? "IFNEQ" : "IFEQ"),
+	op1, op2,
+	exp1, exp2,
+	(result ? "TRUE" : "FALSE"));
+}
+
diff -NaubB ./make-3.81/available_rules.c ./make-3.81g/available_rules.c
--- ./make-3.81/available_rules.c	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/available_rules.c	2007-12-14 19:53:50.852947000 -0300
@@ -0,0 +1,283 @@
+#include <stdio.h>
+#include <string.h>
+#include "plugin.h"
+
+const int LOG_LEVEL = 1;
+
+FILE* f;
+unsigned int level = 0;
+unsigned int rule_has_commands;
+int printing_rule;
+
+/* plugin implementation */
+
+static void EnterDirectory (unsigned int makelevel, const char *directory);
+static void ExitDirectory  (void);
+static void ClosePlugin    (void);
+#if 0
+static void VarDefine      (const char* varname, const char* value, int origin);
+static void VarLookup      (const char* varname, const char* value, int origin);
+static void VarAppend      (const char* varname, const char* oldvalue, const char* appending, int origin);
+static void FuncCall       (const char* function);
+#endif
+static void EnterMakefile  (const char* name, int flags);
+static void EnterRule      (int has_commands);
+static void RuleHeader     (const char* header);
+static void ExitRule       (void);
+static void ExitMakefile   (void);
+#if 0
+static void GoalSeek       (const char* goal);
+static void ProcessRuleIn  (const char* rule);
+static void ProcessRuleOut (void);
+static void CmdBefore      (const char* argv[], unsigned int argc, const char* env[], unsigned int envc);
+static void CmdAfter       (int sig, int ret);
+static void IfDefEval      (const char* target, const char* exp, int negated, int result);
+static void IfEqEval       (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result);
+#endif
+
+
+
+static void TAB(void)
+{
+    int i;
+    for (i=0; i<level; i++)
+	fprintf(f, "\t");
+}
+
+/* Plugins shall implement the following function:
+*/
+void
+initialize_plugin (const char *argument, struct Plugin_data *data)
+{
+  data->enter_directory_callback = EnterDirectory;
+  data->exit_directory_callback = ExitDirectory;
+  data->close_plugin_callback = ClosePlugin;
+  /*
+  data->var_define_callback = VarDefine;
+  data->var_lookup_callback = VarLookup;
+  data->var_append_callback = VarAppend;
+  */
+  data->begin_makefile_callback = EnterMakefile;
+  data->begin_parse_rule = EnterRule;
+  data->parse_rule_header = RuleHeader;
+  data->end_parse_rule = ExitRule;
+  data->end_makefile_callback = ExitMakefile;
+
+/*
+  data->function_call_callback = FuncCall;
+    */
+  
+  /*data->goal_seek_callback = GoalSeek;*/
+  /*
+  data->rule_enter_callback = ProcessRuleIn;
+  data->rule_exit_callback = ProcessRuleOut;
+  
+  data->before_command_callback = CmdBefore;
+  data->after_command_callback = CmdAfter;
+
+  data->ifdef_eval_callback = IfDefEval;
+  data->ifeq_eval_callback = IfEqEval;
+    */
+  f = fopen("plugin.log", "wt");
+}
+
+
+static void
+EnterDirectory (unsigned int makelevel, const char *directory)
+{
+    if (level == LOG_LEVEL)
+    {
+  TAB();
+  fprintf (f, "Plugin: Entering dir %s, level %d\n", directory, makelevel);
+  /*level++;*/
+  }
+}
+
+static void
+ExitDirectory (void)
+{
+    if (level == LOG_LEVEL)
+    {
+  /*level--;*/
+  TAB();
+  fprintf (f, "Plugin: Exiting dir\n");
+  }
+}
+
+static void
+ClosePlugin ()
+{
+  fprintf (f, "Plugin: Closing\n");
+  fclose(f);
+}
+
+#if 0
+static void
+VarDefine (const char* varname, const char* value, int origin)
+{
+  TAB();
+  fprintf (f, "Plugin: %s = '%s' at %d\n", varname, value, origin);
+}
+
+static void
+VarLookup (const char* varname, const char* value, int origin)
+{
+  TAB();
+  if (value != 0)
+      fprintf (f, "Plugin: var lookup: %s = '%s' at %d\n", varname, value, origin);
+  else
+      fprintf (f, "Plugin: var %s lookup FAILED\n", varname);
+}
+
+static void
+VarAppend (const char* varname, const char* oldvalue, const char* appending, int origin)
+{
+  TAB();
+  fprintf (f, "Plugin: %s += '%s' at %d (old='%s')\n", varname, appending, origin, oldvalue);
+}
+
+static void
+FuncCall (const char* function)
+{
+  TAB();
+  fprintf (f, "Plugin: call to %s\n", function);
+}
+#endif
+
+static void
+EnterMakefile  (const char* name, int flags)
+{
+    level++;
+    if (level == LOG_LEVEL)
+    {
+	TAB();
+	fprintf(f, "Plugin: enter makefile '%s' flags=%d\n", name, flags);
+	/*level++;*/
+    }
+}
+
+static void
+EnterRule (int has_commands)
+{
+    if (level == LOG_LEVEL)
+    {
+	rule_has_commands = has_commands;
+	printing_rule = 0;
+    }
+}
+
+static void
+RuleHeader (const char* header)
+{
+    if (level == LOG_LEVEL)
+    {
+	if (strchr(header, '.') == NULL)
+	{
+	    if (!printing_rule)
+	    {
+		TAB();
+		printing_rule = 1;
+	    }
+	    fprintf(f, "%s ", header);
+	}
+    }
+}
+
+static void
+ExitRule (void)
+{
+    if (level == LOG_LEVEL)
+    {
+	if (printing_rule)
+	{
+	    if (rule_has_commands)
+		fprintf(f, ": {}\n");
+	    else
+		fprintf(f, ": {CMDS}\n");
+	}
+    }
+}
+
+static void
+ExitMakefile (void)
+{
+    if (level == LOG_LEVEL)
+    {
+	TAB();
+	fprintf(f, "Plugin: exit makefile\n");
+	/*level--;*/
+    }
+    level--;
+}
+
+#if 0
+static void
+ProcessRuleIn (const char* rule)
+{
+    TAB();
+    fprintf(f, "Plugin: processing rule '%s'\n", rule);
+    level++;
+}
+
+static void
+ProcessRuleOut (void)
+{
+    level--;
+    TAB();
+    fprintf(f, "Plugin: processing rule out\n");
+}
+
+
+static void
+CmdBefore (const char* argv[], unsigned int argc, const char* env[], unsigned int envc)
+{
+    unsigned int i;
+    TAB();
+    fprintf(f, "Plugin: before execute '%s'\n", argv[0]);
+    TAB();
+    fprintf(f, "\tARGS: ");
+    for(i=1; i<argc; i++)
+	fprintf(f, "%s ", argv[i]);
+    fprintf(f, "\n");
+#if 0
+    TAB();
+    fprintf(f, "\tENV: ");
+    for(i=0; i<envc; i++)
+	fprintf(f, "%s ", env[i]);
+    fprintf(f, "\n");
+#endif
+}
+
+static void
+CmdAfter (int sig, int ret)
+{
+    TAB();
+    if (sig != 0 || ret != 0)
+	fprintf(f, "Plugin: command failed, returned %d, sig %d\n", ret, sig);
+    else
+	fprintf(f, "Plugin: after execute, returned %d\n", ret);
+}
+
+static void
+IfDefEval (const char* target, const char* exp, int negated, int result)
+{
+    TAB();
+    fprintf(f, "%s %s (='%s') returned %s\n", 
+	(negated ? "IFNDEF" : "IFDEF"),
+	target, 
+	exp, 
+	(result ? "TRUE" : "FALSE"));
+}
+
+static void
+IfEqEval (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result)
+{
+    TAB();
+    fprintf(f, "%s %s == %s ('%s' == '%s') returned %s\n", 
+	(negated ? "IFNEQ" : "IFEQ"),
+	op1, op2,
+	exp1, exp2,
+	(result ? "TRUE" : "FALSE"));
+}
+#endif
+
Common subdirectories: ./make-3.81/config and ./make-3.81g/config
diff -NaubB ./make-3.81/config.h.in ./make-3.81g/config.h.in
--- ./make-3.81/config.h.in	2006-04-01 03:40:00.000000000 -0300
+++ ./make-3.81g/config.h.in	2007-12-12 20:18:42.000000000 -0300
@@ -338,6 +338,10 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Sets the default parser behaviour as POSIX regarding backspace and new line
+   */
+#undef POSIX_BSNL
+
 /* Define to 1 if the C compiler supports function prototypes. */
 #undef PROTOTYPES
 
diff -NaubB ./make-3.81/configure ./make-3.81g/configure
--- ./make-3.81/configure	2006-04-01 03:40:00.000000000 -0300
+++ ./make-3.81g/configure	2007-12-12 20:16:31.000000000 -0300
@@ -1,7 +1,7 @@
 #! /bin/sh
 # From configure.in Id: configure.in,v 1.142 2006/04/01 06:36:40 psmith Exp .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for GNU make 3.81.
+# Generated by GNU Autoconf 2.59 for GNU make 3.81g.
 #
 # Report bugs to <bug-make@gnu.org>.
 #
@@ -270,8 +270,8 @@
 # Identity of this package.
 PACKAGE_NAME='GNU make'
 PACKAGE_TARNAME='make'
-PACKAGE_VERSION='3.81'
-PACKAGE_STRING='GNU make 3.81'
+PACKAGE_VERSION='3.81g'
+PACKAGE_STRING='GNU make 3.81g'
 PACKAGE_BUGREPORT='bug-make@gnu.org'
 
 ac_unique_file="vpath.c"
@@ -781,7 +781,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GNU make 3.81 to adapt to many kinds of systems.
+\`configure' configures GNU make 3.81g to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -847,7 +847,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU make 3.81:";;
+     short | recursive ) echo "Configuration of GNU make 3.81g:";;
    esac
   cat <<\_ACEOF
 
@@ -862,6 +862,8 @@
   --enable-case-insensitive-file-system
                           enable case insensitive file system support
   --disable-job-server    disallow recursive make communication during -jN
+  --disable-default-posix Sets the default parser behaviour as NON POSIX
+                          regarding backspace and new line
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -976,14 +978,14 @@
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi
-    cd "$ac_popdir"
+    cd $ac_popdir
   done
 fi
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU make configure 3.81
+GNU make configure 3.81g
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -997,7 +999,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU make $as_me 3.81, which was
+It was created by GNU make $as_me 3.81g, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1650,7 +1652,7 @@
 
 # Define the identity of the package.
  PACKAGE='make'
- VERSION='3.81'
+ VERSION='3.81g'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2350,7 +2352,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2408,7 +2411,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2524,7 +2528,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2578,7 +2583,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2623,7 +2629,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -2667,7 +2674,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3486,7 +3494,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3540,7 +3549,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3605,7 +3615,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3775,7 +3786,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -3838,7 +3850,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -4033,7 +4046,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5080,7 +5094,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5171,7 +5186,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5221,7 +5237,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5687,7 +5704,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5741,7 +5759,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5928,7 +5947,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -5957,7 +5977,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6027,7 +6048,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6079,7 +6101,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6150,7 +6173,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6202,7 +6226,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6276,7 +6301,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6330,7 +6356,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6397,7 +6424,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6569,7 +6597,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6641,7 +6670,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6695,7 +6725,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6766,7 +6797,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6820,7 +6852,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -6945,7 +6978,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7021,7 +7055,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7183,7 +7218,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7477,7 +7513,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7547,7 +7584,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7646,7 +7684,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7714,7 +7753,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7774,7 +7814,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7851,7 +7892,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7921,7 +7963,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7997,7 +8040,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8051,7 +8095,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8116,7 +8161,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8309,7 +8355,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8375,7 +8422,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8414,7 +8462,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8594,7 +8643,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8675,7 +8725,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8816,7 +8867,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -8954,7 +9006,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9139,7 +9192,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9181,24 +9235,18 @@
   ac_cv_func_fork_works=cross
 else
   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-
-	  /* By Ruediger Kuhlmann. */
+/* By Ruediger Kuhlmann. */
+      #include <sys/types.h>
+      #if HAVE_UNISTD_H
+      # include <unistd.h>
+      #endif
+      /* Some systems only have a dummy stub for fork() */
+      int main ()
+      {
 	  if (fork() < 0)
 	    exit (1);
 	  exit (0);
-
-  ;
-  return 0;
-}
+      }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -9477,7 +9525,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9571,7 +9620,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9745,7 +9795,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9846,7 +9897,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9919,7 +9971,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -9998,7 +10051,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10067,7 +10121,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10135,7 +10190,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10209,7 +10265,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10313,7 +10370,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10388,7 +10446,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10540,7 +10599,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10608,7 +10668,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10785,7 +10846,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -10861,7 +10923,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11015,7 +11078,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11166,7 +11230,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11317,7 +11382,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11459,7 +11525,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11503,7 +11570,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11648,7 +11716,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11716,7 +11785,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11792,7 +11862,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11868,7 +11939,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -11944,7 +12016,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12129,7 +12202,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12206,7 +12280,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12347,7 +12422,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12417,7 +12493,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12498,7 +12575,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12584,7 +12662,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12684,7 +12763,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12754,7 +12834,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12835,7 +12916,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -12957,7 +13039,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13027,7 +13110,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13145,7 +13229,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13215,7 +13300,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13299,7 +13385,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -13455,6 +13542,19 @@
   make_cv_job_server="yes"
 fi;
 
+# Check whether --enable-default-posix or --disable-default-posix was given.
+if test "${enable_default_posix+set}" = set; then
+  enableval="$enable_default_posix"
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define POSIX_BSNL 0
+_ACEOF
+
+
+fi;
+
 has_wait_nohang=yes
 case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
   no/no) has_wait_nohang=no ;;
@@ -13490,7 +13590,8 @@
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -14195,7 +14296,7 @@
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by GNU make $as_me 3.81, which was
+This file was extended by GNU make $as_me 3.81g, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14258,7 +14359,7 @@
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-GNU make config.status 3.81
+GNU make config.status 3.81g
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -14719,6 +14820,11 @@
   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
   esac
 
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
   # Let's still pretend it is `configure' which instantiates (i.e., don't
   # use $as_me), people would be surprised to read:
   #    /* config.h.  Generated by config.status.  */
@@ -14757,12 +14863,6 @@
 	 fi;;
       esac
     done` || { (exit 1); exit 1; }
-
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
   sed "$ac_vpsub
diff -NaubB ./make-3.81/configure.in ./make-3.81g/configure.in
--- ./make-3.81/configure.in	2006-04-01 03:36:40.000000000 -0300
+++ ./make-3.81g/configure.in	2007-12-12 20:05:36.000000000 -0300
@@ -16,7 +16,7 @@
 # GNU Make; see the file COPYING.  If not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
-AC_INIT([GNU make],[3.81],[bug-make@gnu.org])
+AC_INIT([GNU make],[3.81g],[bug-make@gnu.org])
 
 AC_PREREQ(2.59)
 AC_REVISION([[$Id: configure.in,v 1.142 2006/04/01 06:36:40 psmith Exp $]])
@@ -276,6 +276,14 @@
   [make_cv_job_server="$enableval" user_job_server="$enableval"],
   [make_cv_job_server="yes"])
 
+AC_ARG_ENABLE(default-posix, 
+	AC_HELP_STRING([--disable-default-posix],
+                 [Sets the default parser behaviour as NON POSIX regarding backspace and new line]),
+    ,
+    AC_DEFINE(POSIX_BSNL,
+   				 0, [Sets the default parser behaviour as POSIX regarding backspace and new line])
+   ) 
+  
 has_wait_nohang=yes
 case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
   no/no) has_wait_nohang=no ;;
Common subdirectories: ./make-3.81/doc and ./make-3.81g/doc
diff -NaubB ./make-3.81/function.c ./make-3.81g/function.c
--- ./make-3.81/function.c	2006-04-01 03:36:40.000000000 -0300
+++ ./make-3.81g/function.c	2007-12-06 13:35:31.000000000 -0300
@@ -23,6 +23,7 @@
 #include "job.h"
 #include "commands.h"
 #include "debug.h"
+#include "plugin_support.h"
 
 #ifdef _AMIGA
 #include "amiga.h"
@@ -268,6 +269,14 @@
       function_table_entry_key.name = s;
       function_table_entry_key.len = e - s;
 
+      {
+        char* const function_name = (char*)malloc(function_table_entry_key.len+1);
+	memcpy(function_name, function_table_entry_key.name, function_table_entry_key.len);
+	function_name[function_table_entry_key.len] = 0;
+        notify_function_call(function_name);
+	free(function_name);
+      }
+
       return hash_find_item (&function_table, &function_table_entry_key);
     }
   return 0;
Common subdirectories: ./make-3.81/glob and ./make-3.81g/glob
diff -NaubB ./make-3.81/job.c ./make-3.81g/job.c
--- ./make-3.81/job.c	2006-03-20 00:03:04.000000000 -0300
+++ ./make-3.81g/job.c	2007-12-11 13:05:33.000000000 -0300
@@ -26,6 +26,7 @@
 #include "commands.h"
 #include "variable.h"
 #include "debug.h"
+#include "plugin_support.h"
 
 #include <string.h>
 
@@ -230,6 +231,8 @@
 
 unsigned int jobserver_tokens = 0;
 
+extern int posix_flag;
+
 #ifdef WINDOWS32
 /*
  * The macro which references this function is defined in make.h.
@@ -681,6 +684,8 @@
 	  break;
 	}
 
+      notify_after_command(exit_sig, exit_code);
+
       child_failed = exit_sig != 0 || exit_code != 0;
 
       /* Search for a child matching the deceased one.  */
@@ -2074,9 +2079,13 @@
 # else
 
   /* Run the program.  */
+  notify_before_command(argv, envp);
+  
   environ = envp;
   execvp (argv[0], argv);
 
+  notify_command_failure(errno);
+
 # endif /* !__EMX__ */
 
   switch (errno)
@@ -2730,7 +2739,7 @@
 #else
 # define PRESERVE_BSNL  1
 #endif
-	    if (PRESERVE_BSNL)
+	    if (PRESERVE_BSNL && posix_flag)
 	      {
 		*(ap++) = '\\';
 		*(ap++) = '\\';
diff -NaubB ./make-3.81/main.c ./make-3.81g/main.c
--- ./make-3.81/main.c	2006-03-19 23:36:37.000000000 -0300
+++ ./make-3.81g/main.c	2007-12-12 16:21:10.000000000 -0300
@@ -25,6 +25,7 @@
 #include "rule.h"
 #include "debug.h"
 #include "getopt.h"
+#include "plugin_support.h"
 
 #include <assert.h>
 #ifdef _AMIGA
@@ -163,6 +164,20 @@
 int suspend_flag = 0;
 #endif
 
+#if PLUGIN_SUPPORT
+/* Plugin support flags */
+static struct stringlist *plugins_names;
+static int plugin_mq = -1;
+unsigned int global_mq = 0;
+static int plugin_alive = 0;
+#endif
+
+#ifdef POSIX_BSNL
+int posix_flag = 1;
+#else
+int posix_flag = 0;
+#endif
+
 /* Environment variables override makefile definitions.  */
 
 int env_overrides = 0;
@@ -325,11 +340,22 @@
     N_("\
   -n, --just-print, --dry-run, --recon\n\
                               Don't actually run any commands; just print them.\n"),
+#ifdef POSIX_BSNL
+    N_("\
+  -N, --no-posix              Behave as pre-3.81 version regarding backspace newlines.\n"),
+#else
+    N_("\
+  -N, --posix                 Be POSIX, as 3.81 version, regarding backspace newlines.\n"),
+#endif
     N_("\
   -o FILE, --old-file=FILE, --assume-old=FILE\n\
                               Consider FILE to be very old and don't remake it.\n"),
     N_("\
   -p, --print-data-base       Print make's internal database.\n"),
+#if PLUGIN_SUPPORT
+    N_("\
+  -P, --plugin PLUGIN         Load PLUGIN and report events to it.\n"),
+#endif
     N_("\
   -q, --question              Run no commands; exit status says if up to date.\n"),
     N_("\
@@ -396,9 +422,17 @@
       "check-symlink-times" },
     { 'm', ignore, 0, 0, 0, 0, 0, 0, 0 },
     { 'n', flag, (char *) &just_print_flag, 1, 1, 1, 0, 0, "just-print" },
+#ifdef POSIX_BSNL
+    { 'N', flag_off, (char *) &posix_flag, 1, 1, 1, 0, 0, "no-posix" },
+#else
+    { 'N', flag, (char *) &posix_flag, 1, 1, 1, 0, 0, "posix" },
+#endif
     { 'o', string, (char *) &old_files, 0, 0, 0, 0, 0, "old-file" },
     { 'p', flag, (char *) &print_data_base_flag, 1, 1, 0, 0, 0,
       "print-data-base" },
+#if PLUGIN_SUPPORT
+    { 'P', string, (char *) &plugins_names, 0, 0, 0, 0, 0, "plugin" },
+#endif
     { 'q', flag, (char *) &question_flag, 1, 1, 1, 0, 0, "question" },
     { 'r', flag, (char *) &no_builtin_rules_flag, 1, 1, 0, 0, 0,
       "no-builtin-rules" },
@@ -408,6 +442,10 @@
     { 'S', flag_off, (char *) &keep_going_flag, 1, 1, 0, 0,
       (char *) &default_keep_going_flag, "no-keep-going" },
     { 't', flag, (char *) &touch_flag, 1, 1, 1, 0, 0, "touch" },
+#if PLUGIN_SUPPORT
+    { 'u', flag, (char *) &plugin_alive, 1, 1, 0, 0, 0, "plugin_alive" },
+    { 'U', positive_int, (char *) &global_mq, 1, 1, 0, 0, 0, "MESSAGE_QUEUE" },
+#endif
     { 'v', flag, (char *) &print_version_flag, 1, 1, 0, 0, 0, "version" },
     { 'w', flag, (char *) &print_directory_flag, 1, 1, 0, 0, 0,
       "print-directory" },
@@ -1253,6 +1292,33 @@
       if (print_version_flag)
         die (0);
     }
+#if PLUGIN_SUPPORT
+  if (plugins_names != NULL)
+  {
+    if (plugins_names->max != 0)
+    {
+      if ( plugins_names->list[0] != NULL )
+      {
+         plugin_mq = launch_plugin(plugins_names->list[0], "argument");
+	 global_mq = (unsigned int)plugin_mq;
+	 if (plugin_mq != -1)
+	 {
+	    plugin_alive = 1;
+	 }
+      }
+    }
+  }
+  else if (plugin_alive != 0)
+  {
+    plugin_mq = (int)global_mq;
+    connect_to_plugin(plugin_mq);
+  }
+  else
+  {
+    /* fake, just for avoiding error message */
+    global_mq = 1;
+  }
+#endif
 
 #ifndef VMS
   /* Set the "MAKE_COMMAND" variable to the name we were invoked with.
@@ -2101,6 +2166,7 @@
 	    exit (WIFEXITED(status) ? WEXITSTATUS(status) : EXIT_FAILURE);
 	  }
 #else
+	  disconnect_from_plugin(1);
 	  exec_command (nargv, environ);
 #endif
 	  /* NOTREACHED */
@@ -3069,6 +3135,8 @@
 	chdir (directory_before_chdir);
 
       log_working_directory (0);
+    
+      disconnect_from_plugin(0);
     }
 
   exit (status);
@@ -3093,6 +3161,11 @@
   if (print_data_base_flag)
     fputs ("# ", stdout);
 
+  if (entering)
+    notify_entry_dir(makelevel, starting_directory);
+  else
+    notify_exit_dir();
+
   /* Use entire sentences to give the translators a fighting chance.  */
 
   if (makelevel == 0)
diff -NaubB ./make-3.81/Makefile.am ./make-3.81g/Makefile.am
--- ./make-3.81/Makefile.am	2006-04-01 03:36:40.000000000 -0300
+++ ./make-3.81g/Makefile.am	2007-12-12 19:51:21.000000000 -0300
@@ -26,6 +26,8 @@
   MAYBE_W32 =	w32
   W32INC =	-I $(top_srcdir)/w32/include
   W32LIB =	-Lw32 -lw32
+else
+  DLLIB = -ldl
 endif
 
 SUBDIRS =	glob config po doc $(MAYBE_W32)
@@ -41,18 +43,20 @@
 
 make_SOURCES =	ar.c arscan.c commands.c default.c dir.c expand.c file.c \
 		function.c getopt.c getopt1.c implicit.c job.c main.c \
-		misc.c read.c remake.c $(remote) rule.c signame.c \
+		misc.c plugin_support.c read.c remake.c $(remote) rule.c signame.c \
 		strcache.c variable.c version.c vpath.c hash.c
 
 EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
 
 noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
-		debug.h getopt.h gettext.h hash.h
+		debug.h getopt.h gettext.h hash.h plugin_support.h
 
 make_LDADD =	@LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
 # Only process if target is MS-Windows
 if WINDOWSENV
     make_LDADD += $(W32LIB)
+else
+    make_LDADD += $(DLLIB)
 endif
 
 man_MANS =	make.1
@@ -69,14 +73,14 @@
 # Extra stuff to include in the distribution.
 
 EXTRA_DIST =	README build.sh.in $(man_MANS) \
-		README.customs README.OS2 \
+		README.customs README.OS2 PLUGINS_SUPPORT.txt \
 		SCOPTIONS SMakefile \
 		README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
 		README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
 		README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
 		make_msvc_net2003.sln make_msvc_net2003.vcproj \
 		readme.vms makefile.vms makefile.com config.h-vms \
-		vmsdir.h vmsfunctions.c vmsify.c
+		vmsdir.h vmsfunctions.c vmsify.c plugin.h
 
 # This is built during configure, but behind configure's back
 
diff -NaubB ./make-3.81/Makefile.in ./make-3.81g/Makefile.in
--- ./make-3.81/Makefile.in	2006-04-01 03:40:04.000000000 -0300
+++ ./make-3.81g/Makefile.in	2007-12-12 20:16:36.000000000 -0300
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.2 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005  Free Software Foundation, Inc.
+# 2003, 2004  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -33,6 +33,8 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
 
+SOURCES = $(nodist_loadavg_SOURCES) $(make_SOURCES) $(EXTRA_make_SOURCES)
+
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 VPATH = @srcdir@
@@ -59,8 +61,9 @@
 bin_PROGRAMS = make$(EXEEXT)
 # Only process if target is MS-Windows
 @WINDOWSENV_TRUE@am__append_1 = $(W32LIB)
+@WINDOWSENV_FALSE@am__append_2 = $(DLLIB)
 # Only process if target is MS-Windows
-@WINDOWSENV_TRUE@am__append_2 = $(W32INC)
+@WINDOWSENV_TRUE@am__append_3 = $(W32INC)
 check_PROGRAMS = loadavg$(EXEEXT)
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
@@ -91,9 +94,9 @@
 loadavg_DEPENDENCIES =
 am__make_SOURCES_DIST = ar.c arscan.c commands.c default.c dir.c \
 	expand.c file.c function.c getopt.c getopt1.c implicit.c job.c \
-	main.c misc.c read.c remake.c remote-stub.c remote-cstms.c \
-	rule.c signame.c strcache.c variable.c version.c vpath.c \
-	hash.c
+	main.c misc.c plugin_support.c read.c remake.c remote-stub.c \
+	remote-cstms.c rule.c signame.c strcache.c variable.c \
+	version.c vpath.c hash.c
 @USE_CUSTOMS_FALSE@am__objects_1 = remote-stub$U.$(OBJEXT)
 @USE_CUSTOMS_TRUE@am__objects_1 = remote-cstms$U.$(OBJEXT)
 am_make_OBJECTS = ar$U.$(OBJEXT) arscan$U.$(OBJEXT) \
@@ -101,15 +104,16 @@
 	expand$U.$(OBJEXT) file$U.$(OBJEXT) function$U.$(OBJEXT) \
 	getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) implicit$U.$(OBJEXT) \
 	job$U.$(OBJEXT) main$U.$(OBJEXT) misc$U.$(OBJEXT) \
-	read$U.$(OBJEXT) remake$U.$(OBJEXT) $(am__objects_1) \
-	rule$U.$(OBJEXT) signame$U.$(OBJEXT) strcache$U.$(OBJEXT) \
-	variable$U.$(OBJEXT) version$U.$(OBJEXT) vpath$U.$(OBJEXT) \
-	hash$U.$(OBJEXT)
+	plugin_support$U.$(OBJEXT) read$U.$(OBJEXT) remake$U.$(OBJEXT) \
+	$(am__objects_1) rule$U.$(OBJEXT) signame$U.$(OBJEXT) \
+	strcache$U.$(OBJEXT) variable$U.$(OBJEXT) version$U.$(OBJEXT) \
+	vpath$U.$(OBJEXT) hash$U.$(OBJEXT)
 make_OBJECTS = $(am_make_OBJECTS)
 am__DEPENDENCIES_1 =
 @WINDOWSENV_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+@WINDOWSENV_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
 make_DEPENDENCIES = @LIBOBJS@ @ALLOCA@ $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_2)
+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
@@ -261,33 +265,34 @@
 @WINDOWSENV_TRUE@MAYBE_W32 = w32
 @WINDOWSENV_TRUE@W32INC = -I $(top_srcdir)/w32/include
 @WINDOWSENV_TRUE@W32LIB = -Lw32 -lw32
+@WINDOWSENV_FALSE@DLLIB = -ldl
 SUBDIRS = glob config po doc $(MAYBE_W32)
 @USE_CUSTOMS_FALSE@remote = remote-stub.c
 @USE_CUSTOMS_TRUE@remote = remote-cstms.c
 make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
 		function.c getopt.c getopt1.c implicit.c job.c main.c \
-		misc.c read.c remake.c $(remote) rule.c signame.c \
+		misc.c plugin_support.c read.c remake.c $(remote) rule.c signame.c \
 		strcache.c variable.c version.c vpath.c hash.c
 
 EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
 noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
-		debug.h getopt.h gettext.h hash.h
+		debug.h getopt.h gettext.h hash.h plugin_support.h
 
 make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ \
-	$(am__append_1)
+	$(am__append_1) $(am__append_2)
 man_MANS = make.1
-AM_CPPFLAGS = $(GLOBINC) $(am__append_2)
+AM_CPPFLAGS = $(GLOBINC) $(am__append_3)
 
 # Extra stuff to include in the distribution.
 EXTRA_DIST = README build.sh.in $(man_MANS) \
-		README.customs README.OS2 \
+		README.customs README.OS2 PLUGINS_SUPPORT.txt \
 		SCOPTIONS SMakefile \
 		README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
 		README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
 		README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
 		make_msvc_net2003.sln make_msvc_net2003.vcproj \
 		readme.vms makefile.vms makefile.com config.h-vms \
-		vmsdir.h vmsfunctions.c vmsify.c
+		vmsdir.h vmsfunctions.c vmsify.c plugin.h
 
 
 # This is built during configure, but behind configure's back
@@ -443,6 +448,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadavg-getloadavg$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc$U.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_support$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remake$U.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote-cstms$U.Po@am__quote@
@@ -516,6 +522,8 @@
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
 misc_.c: misc.c $(ANSI2KNR)
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/misc.c; then echo $(srcdir)/misc.c; else echo misc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
+plugin_support_.c: plugin_support.c $(ANSI2KNR)
+	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/plugin_support.c; then echo $(srcdir)/plugin_support.c; else echo plugin_support.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
 read_.c: read.c $(ANSI2KNR)
 	$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/read.c; then echo $(srcdir)/read.c; else echo read.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@
 remake_.c: remake.c $(ANSI2KNR)
@@ -542,10 +550,11 @@
 default_.$(OBJEXT) dir_.$(OBJEXT) expand_.$(OBJEXT) file_.$(OBJEXT) \
 function_.$(OBJEXT) getloadavg_.$(OBJEXT) getopt_.$(OBJEXT) \
 getopt1_.$(OBJEXT) hash_.$(OBJEXT) implicit_.$(OBJEXT) job_.$(OBJEXT) \
-main_.$(OBJEXT) misc_.$(OBJEXT) read_.$(OBJEXT) remake_.$(OBJEXT) \
-remote-cstms_.$(OBJEXT) remote-stub_.$(OBJEXT) rule_.$(OBJEXT) \
-signame_.$(OBJEXT) strcache_.$(OBJEXT) variable_.$(OBJEXT) \
-version_.$(OBJEXT) vmsjobs_.$(OBJEXT) vpath_.$(OBJEXT) : $(ANSI2KNR)
+main_.$(OBJEXT) misc_.$(OBJEXT) plugin_support_.$(OBJEXT) \
+read_.$(OBJEXT) remake_.$(OBJEXT) remote-cstms_.$(OBJEXT) \
+remote-stub_.$(OBJEXT) rule_.$(OBJEXT) signame_.$(OBJEXT) \
+strcache_.$(OBJEXT) variable_.$(OBJEXT) version_.$(OBJEXT) \
+vmsjobs_.$(OBJEXT) vpath_.$(OBJEXT) : $(ANSI2KNR)
 uninstall-info-am:
 install-man1: $(man1_MANS) $(man_MANS)
 	@$(NORMAL_INSTALL)
@@ -600,13 +609,7 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
+	@set fnord $$MAKEFLAGS; amf=$$2; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -618,7 +621,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
@@ -626,13 +629,7 @@
 
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
+	@set fnord $$MAKEFLAGS; amf=$$2; \
 	dot_seen=no; \
 	case "$@" in \
 	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
@@ -653,7 +650,7 @@
 	    local_target="$$target"; \
 	  fi; \
 	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
diff -NaubB ./make-3.81/NEWS ./make-3.81g/NEWS
--- ./make-3.81/NEWS	2006-04-01 03:36:40.000000000 -0300
+++ ./make-3.81g/NEWS	2007-12-12 20:20:01.000000000 -0300
@@ -9,6 +9,12 @@
 See the README file and the GNU make manual for instructions for
 reporting bugs.
 
+Version 3.81g
+
+* Added plugins support
+
+
+
 Version 3.81
 
 * GNU make is ported to OS/2.
diff -NaubB ./make-3.81/plugin.h ./make-3.81g/plugin.h
--- ./make-3.81/plugin.h	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/plugin.h	2007-12-06 16:02:27.000000000 -0300
@@ -0,0 +1,35 @@
+/* Header for plugin integration */
+
+
+struct Plugin_data
+{
+  void (*enter_directory_callback) (unsigned int makelevel, const char *directory);
+  void (*exit_directory_callback)  (void);
+  void (*close_plugin_callback)    (void);
+  
+  void (*begin_makefile_callback)  (const char* name, int flags);
+  void (*parse_implicit_rule)      (const char* rule, int has_commands);    /* not yet implemented (don't remember actually :D ) */
+  void (*begin_parse_rule)         (int has_commands);
+  void (*parse_rule_header)        (const char* header);
+  void (*end_parse_rule)           (void);
+  void (*end_makefile_callback)    (void);
+  void (*ifdef_eval_callback)      (const char* target, const char* exp, int negated, int result); /* negated: ifndef */
+  void (*ifeq_eval_callback)       (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result); /* negated: ifneq */
+  
+  void (*var_define_callback)      (const char* varname, const char* value, int origin);
+  void (*var_lookup_callback)      (const char* varname, const char* value, int origin);  /* value == NULL means not found */
+  void (*var_append_callback)      (const char* varname, const char* oldvalue, const char* appending, int origin); /* not yet implemented */
+
+/*  void (*goal_seek_callback)       (const char* goal);*/
+  void (*rule_enter_callback)      (const char* rule);
+  void (*rule_exit_callback)       (void);
+  
+  void (*before_command_callback)  (const char* argv[], unsigned int argc, const char* env[], unsigned int envc); /* argc >= 1 */
+  void (*after_command_callback)   (int sig, int ret);
+  
+  void (*function_call_callback)   (const char* function_name);
+};
+
+/* Plugins shall implement the following function:
+void initialize_plugin (const char *argument, struct Plugin_data *data);
+*/
diff -NaubB ./make-3.81/PLUGINS_SUPPORT.txt ./make-3.81g/PLUGINS_SUPPORT.txt
--- ./make-3.81/PLUGINS_SUPPORT.txt	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/PLUGINS_SUPPORT.txt	2007-12-12 20:12:42.000000000 -0300
@@ -0,0 +1,45 @@
+Plugin Support for Make 3.81
+============================
+
+Usage
+    -P pluginname.so
+    --plugin pluginname.so
+
+Plugin development:
+    * plugins have to be compiled with the --shared switch, for example
+	    gcc --shared myplugin.c -o myplugin.so
+    * plugins have to implement the initialize_plugin function (refer to examples)
+    * refer to the plugin.h header file for available events.
+
+Make compilation:
+    get sources from the .tar.gz file, then run:
+	./configure
+	make
+
+Other additions
+    ./configure accepts now how to behave regarding the POSIX backspace/newline parsing.
+    Depending on how it is invoked, the default behavior of the Make will change.
+    If configure is ran WITHOUT --disable-default-posix, the following options will
+    later be available in the Make application:
+        -N
+	--no-posix
+	    disables the POSIX behavior that breaks Makefiles invoking SED,
+	    working as pre-3.81 version.
+    whereas if the configure is ran WITH the --disable--default-posix, the following
+    options will be later available in the Make application:
+        -N
+	--posix
+	    enables the POSIX behavior that breaks Makefiles invoking SED,
+	    working as 3.81 version.
+	
+TODO:
+    * ability to specify more than one plugin
+    * check plugin API version compatibility
+    * provide support for plugin arguments
+    * extend support to other OSs (only unix supported)
+    * KNOWN ISSUE: add signals support (e.g. CTRL-C keeps the plugin alive)
+    
+
+Authors
+    Ivan Mari, message queues support
+    Daniel Gutson, design and hooks within make
diff -NaubB ./make-3.81/plugin_support.c ./make-3.81g/plugin_support.c
--- ./make-3.81/plugin_support.c	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/plugin_support.c	2007-12-12 13:46:45.000000000 -0300
@@ -0,0 +1,891 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <dlfcn.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "plugin.h"
+#include "plugin_support.h"
+
+#if PLUGIN_SUPPORT
+
+#define	VAR_NAME_LEN	20
+#define	VAR_VALUE_LEN	255
+#define MAX_MSG_LEN 255
+#define	MAX_FN_NAME_LEN	50
+
+const int CHILD_PID = 0;
+const int PROJECT_ID = 0x25;    //any integer to be passed to ftok
+const int MAX_DIGITS = 10;
+
+static int msqid = -1;
+static void *handle = 0;
+char tmp_pathname[] = "make_plugin_XXXXXX";
+static int users = 0;
+
+static struct Args
+{
+    char** arguments;
+    unsigned int argc;
+    unsigned int envc;
+    unsigned int current;
+}
+current_args;
+
+typedef void (*INIT_PLUGIN_FUNCTION_PTR) (const char *, struct Plugin_data *);
+
+typedef enum PluginIndexFunction
+{
+  CONNECT,
+  ENTER_DIR,
+  EXIT_DIR,
+  CLOSE,
+  ENTER_MAKEFILE,
+  IMPLICIT_RULE,
+  BEGIN_RULE,
+  RULE_HEADER,
+  END_RULE,
+  EXIT_MAKEFILE,
+  VAR_DEFINE,
+  VAR_LOOKUP,
+  VAR_APPEND,
+  FUNCTION_CALL,
+  ENTER_RULE,
+  EXIT_RULE,
+/*  GOAL_SEEK,*/
+  BEFORE_CMD,
+  CMD_ARG,
+  AFTER_CMD,
+  CMD_FAILURE,
+  IFDEF_EVAL,
+  IFEQ_EVAL
+} PluginIndexFunction_t;
+
+
+struct plugin_msg
+{
+  long mtype;
+  PluginIndexFunction_t func_index;
+  union
+  {
+    struct
+    {
+	int keep_alive;
+    } disconnect;
+    struct
+    {
+	unsigned char dir[MAX_MSG_LEN];
+	int level;
+    } dir_entry;
+
+    struct
+    {
+	unsigned char name[MAX_MSG_LEN];
+	int flags;
+    } enter_make;
+    
+    struct
+    {
+	unsigned char rule[MAX_MSG_LEN];
+	int has_commands;
+    } implicit_rule;
+    
+    struct
+    {
+	int has_commands;
+    } begin_rule;
+    
+    struct
+    {
+	unsigned char header[MAX_MSG_LEN];
+    } rule_header;
+
+/*
+    struct
+    {
+	unsigned char goal[MAX_MSG_LEN];
+    } goal_seek;
+*/
+    struct
+    {
+	unsigned char rule[MAX_MSG_LEN];
+    } rule_enter;
+            
+    struct
+    {
+	unsigned char varname[VAR_NAME_LEN];
+	unsigned char varvalue[VAR_VALUE_LEN];
+	int origin;
+    } var_def;
+    
+    struct
+    {
+	unsigned int argc;
+	unsigned int envc;
+    } before_cmd;
+    
+    struct
+    {
+	unsigned char arg[MAX_MSG_LEN];
+    } cmd_arg;
+    
+    struct
+    {
+	int err;
+    } cmd_failure;
+    
+    struct
+    {
+	int sig;
+	int ret;
+    } after_cmd;
+    
+    struct
+    {
+	unsigned char varname[VAR_NAME_LEN];
+	unsigned char varvalue[VAR_VALUE_LEN];
+	int origin;
+	int succeeded;
+    } var_lookup;
+    
+    struct
+    {
+	unsigned char varname[VAR_NAME_LEN];
+	unsigned char oldvalue[VAR_VALUE_LEN];
+	unsigned char append[VAR_VALUE_LEN];
+	int origin;
+    } var_append;
+    
+    struct
+    {
+	unsigned char function_name[MAX_FN_NAME_LEN];
+    } function_call;
+    
+    struct
+    {
+	unsigned char target[MAX_MSG_LEN];
+	unsigned char expanded[VAR_NAME_LEN];
+	int negated;
+	int result;
+    } ifdef_eval;
+
+    struct
+    {
+	unsigned char operand1[VAR_NAME_LEN];
+	unsigned char operand2[VAR_NAME_LEN];
+	unsigned char expanded1[VAR_VALUE_LEN];
+	unsigned char expanded2[VAR_VALUE_LEN];
+	int negated;
+	int result;
+    } ifeq_eval;
+  };
+};
+
+
+int createMessageQueue ();
+int removeMessageQueue ();
+void processMsgs (struct Plugin_data *);
+int invokeFunction (struct Plugin_data *abi, const struct plugin_msg *msg);
+int send_message (const struct plugin_msg *msg);
+int plugin_setup (const char *plugin_name, struct Plugin_data *abi);
+void plugin_tear_down ();
+
+#define	SCPY(dest, source)			\
+    {						\
+	strncpy(dest, source, sizeof(dest));	\
+	dest[sizeof(dest)-1] = 0;		\
+    }
+
+/* this function is for the top-level makefile */
+int
+launch_plugin (const char *plugin_name, const char *args)
+{
+  pid_t pid = -1;
+  struct Plugin_data abi;
+  msqid = createMessageQueue ();
+  if (msqid > 0)
+    {
+/*      printf ("launch_plugin --> Creating message queue, msg queue id: %d\n",
+              msqid);*/
+      pid = fork ();
+
+      if (pid >= 0)
+        {
+          if (pid == CHILD_PID)
+            {
+              /*printf ("launch_plugin -->Child forked\n");*/
+              if (plugin_setup (plugin_name, &abi) == 0)
+                {
+                  processMsgs (&abi);   //child process will enter a loop here
+
+                  plugin_tear_down ();
+		  _Exit(0);
+                }
+              else
+                {
+		  _Exit(1);
+                }
+		
+	      /* not reached here */
+            }
+
+        }
+      else
+        {
+          printf ("Cannot fork");
+          msqid = -1;
+        }
+
+    }
+
+  /* not reached for the child */
+  return msqid;
+}
+
+int
+plugin_setup (const char *plugin_name, struct Plugin_data *abi)
+{
+  int ret_val = -1;
+  INIT_PLUGIN_FUNCTION_PTR initialize_plugin_ptr = 0;
+  handle = dlopen (plugin_name, RTLD_LAZY);
+  if (handle)
+    {
+      /*printf ("plugin_setup --> Plugin %s opened\n", plugin_name);*/
+      initialize_plugin_ptr = dlsym (handle, "initialize_plugin");
+      if (initialize_plugin_ptr)
+        {
+          /*printf ("plugin_setup --> Initializing plugin\n");*/
+	  memset(abi, 0, sizeof(struct Plugin_data));
+          (*initialize_plugin_ptr) (0, abi);
+          ret_val = 0;
+        }
+      else
+        {
+          printf ("Symbol not found");
+          ret_val = -1;
+        }
+    }
+  else
+    {
+      printf ("Cannot open plugin");
+      ret_val = -1;
+    }
+
+
+  return ret_val;
+}
+
+void
+plugin_tear_down ()
+{
+  dlclose (handle);
+  removeMessageQueue( msqid );
+  remove(tmp_pathname);
+}
+
+int
+createMessageQueue ()
+{
+  key_t key = -1;
+  int mq;
+  int tmp_file = mkstemp (tmp_pathname);
+  
+  if (tmp_file == -1)
+    {
+      perror ("Error, mkstemp failed. Cannot create msg queue");
+      return -1;
+    }
+
+  key = ftok (tmp_pathname, PROJECT_ID);
+
+  if (key > 0)
+    {
+      mq = msgget (key, 0644 | IPC_CREAT);
+
+      if (mq < 0)
+        {
+          perror ("Cannot create msg queue");
+	  remove(tmp_pathname);
+          mq = -1;
+        }
+    }
+  else
+    {
+      perror ("Cannot generate unique id to msg queue");
+      mq = -1;
+    }
+
+  return mq;
+}
+
+
+int
+removeMessageQueue ( int mq )
+{
+  struct msqid_ds buf;
+
+  int ret =  msgctl( mq, IPC_RMID, &buf);
+ 
+  if (ret != 0 )
+  {
+   switch( ret )
+   {
+     case EACCES:
+	printf( "The calling process does not have read permission\n");
+        break;
+     case EINVAL:
+        printf(" Invalid message queue id or cmd\n");
+        break;
+     case EPERM:
+        printf("The effective user ID of the calling process does not have appropriate privileges\n");
+        break;
+     default:
+        printf("Unknown error\n");
+   }
+  }
+  
+  return ret;
+}
+
+
+void
+processMsgs (struct Plugin_data *abi)
+{
+  int exit_loop = 0;
+  int error = 0;
+  
+  users = 1;
+
+  struct plugin_msg msg;
+
+  do
+    {
+      int msgresult =
+        msgrcv (msqid, (struct plugin_msg *) &msg, sizeof (msg), 0, 0);
+
+      if (msgresult == -1)
+        {
+          perror ("Cannot receive messages");
+          error = 1;
+        }
+
+      if (!error)
+        {
+          exit_loop = invokeFunction (abi, &msg);
+        }
+
+    }
+  while (!error && !exit_loop);
+}
+
+int
+invokeFunction (struct Plugin_data *abi, const struct plugin_msg *msg)
+{
+  int exit = 0;
+  switch (msg->func_index)
+    {
+    case CONNECT:
+	users++;
+	break;
+	
+    case ENTER_DIR:
+	if (abi->enter_directory_callback != NULL)
+	    abi->enter_directory_callback (msg->dir_entry.level, msg->dir_entry.dir);
+	break;
+
+    case EXIT_DIR:
+	if (abi->exit_directory_callback != NULL)
+    	    abi->exit_directory_callback ();
+	break;
+
+    case CLOSE:
+	users--;
+	if (users == 0 && !msg->disconnect.keep_alive)
+	{
+	    if (abi->close_plugin_callback != NULL)
+		abi->close_plugin_callback ();
+	    exit = 1;
+	}
+	break;
+
+    case ENTER_MAKEFILE:
+	if (abi->begin_makefile_callback != NULL)
+	    abi->begin_makefile_callback(msg->enter_make.name, msg->enter_make.flags);
+	break;
+	
+    case IMPLICIT_RULE:
+	if (abi->parse_implicit_rule != NULL)
+	    abi->parse_implicit_rule(msg->implicit_rule.rule, msg->implicit_rule.has_commands);
+	break;
+	
+    case BEGIN_RULE:
+	if (abi->begin_parse_rule != NULL)
+	    abi->begin_parse_rule(msg->begin_rule.has_commands);
+	break;
+	
+    case RULE_HEADER:
+	if (abi->parse_rule_header != NULL)
+	    abi->parse_rule_header(msg->rule_header.header);
+	break;
+	
+    case END_RULE:
+	if (abi->end_parse_rule != NULL)
+	    abi->end_parse_rule();
+	break;
+	
+    case EXIT_MAKEFILE:
+	if (abi->end_makefile_callback != NULL)
+	    abi->end_makefile_callback();
+	break;
+/*    
+    case GOAL_SEEK:
+	if (abi->goal_seek_callback != NULL)
+	    abi->goal_seek_callback(msg->goal_seek.goal);
+	break;
+*/
+    case ENTER_RULE:
+	if (abi->rule_enter_callback != NULL)
+	    abi->rule_enter_callback(msg->rule_enter.rule);
+	break;
+	
+    case EXIT_RULE:
+	if (abi->rule_exit_callback != NULL)
+	    abi->rule_exit_callback();
+	break;
+        
+    case BEFORE_CMD:
+	if (abi->before_command_callback != NULL)
+	{
+	    /*abi->before_command_callback(msg->before_cmd.cmd);*/
+	    current_args.argc      = msg->before_cmd.argc;
+	    current_args.envc      = msg->before_cmd.envc;
+	    current_args.arguments = (char**) malloc( (current_args.argc + current_args.envc) * sizeof(char*) );
+	    current_args.current   = 0;
+	}
+	break;
+	
+    case CMD_ARG:
+	if (abi->before_command_callback != NULL)
+	{
+	    current_args.arguments[current_args.current] = strdup(msg->cmd_arg.arg);
+	    current_args.current++;
+	    
+	    /* check if it is the last one */
+	    if (current_args.current == (current_args.argc + current_args.envc))
+	    {
+		unsigned int i;
+		abi->before_command_callback((const char**) &current_args.arguments[0], current_args.argc, 
+					     (const char**) &current_args.arguments[0 + current_args.argc], current_args.envc);
+		
+		for (i=0; i < current_args.current; i++)
+		    free(current_args.arguments[i]);
+		    
+		free(current_args.arguments);
+	    }
+	}
+	break;
+    
+    case CMD_FAILURE:
+	break;
+	
+    case AFTER_CMD:
+	if (abi->after_command_callback != NULL)
+	    abi->after_command_callback(msg->after_cmd.sig, msg->after_cmd.ret);
+	break;
+    
+    case VAR_DEFINE:
+	if (abi->var_define_callback != NULL)
+	    abi->var_define_callback(msg->var_def.varname, msg->var_def.varvalue, msg->var_def.origin);
+	break;
+
+    case VAR_LOOKUP:
+	if (abi->var_lookup_callback != NULL)
+	{
+	    const char* value = (msg->var_lookup.succeeded ? msg->var_lookup.varvalue : 0);
+	    abi->var_lookup_callback(msg->var_lookup.varname, value, msg->var_lookup.origin);
+	}
+	break;
+	
+    case VAR_APPEND:
+	if (abi->var_append_callback != NULL)
+	    abi->var_append_callback(msg->var_append.varname, msg->var_append.oldvalue, msg->var_append.append, msg->var_append.origin);
+	break;
+
+    case FUNCTION_CALL:
+	if (abi->function_call_callback != NULL)
+	    abi->function_call_callback(msg->function_call.function_name);
+	break;
+        
+    case IFDEF_EVAL:
+	if (abi->ifdef_eval_callback != NULL)
+	    abi->ifdef_eval_callback(msg->ifdef_eval.target, msg->ifdef_eval.expanded, msg->ifdef_eval.negated, msg->ifdef_eval.result);
+	break;
+    
+    case IFEQ_EVAL:
+	if (abi->ifeq_eval_callback != NULL)
+	    abi->ifeq_eval_callback(msg->ifeq_eval.operand1, msg->ifeq_eval.operand2, msg->ifeq_eval.expanded1, msg->ifeq_eval.expanded2, msg->ifeq_eval.negated, msg->ifeq_eval.result);
+	break;
+    
+    default:
+      printf ("invokeFunction-->Error: invalid function index\n");
+    }
+
+  return exit;
+}
+
+int
+send_message (const struct plugin_msg *msg)
+{
+  int ret_val = -1;
+
+  if (msgsnd (msqid, msg, sizeof (struct plugin_msg), 0) == -1)
+    {
+      perror ("msgsnd");
+      ret_val = -1;
+    }
+  else
+    {
+      ret_val = 0;
+    }
+  return ret_val;
+}
+
+
+/* these functions are for the nested makefiles */
+void
+connect_to_plugin (int mq)
+{
+  msqid = mq; 
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = CONNECT;
+    send_message(&message);
+  }
+}
+
+void
+disconnect_from_plugin (int keep_alive)
+{
+  if (msqid != -1)
+  {
+    /*printf ("closing plugin\n");*/
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = CLOSE;
+    message.disconnect.keep_alive = keep_alive;
+    if (send_message (&message) != 0)
+    {
+      printf ("Error closing plugin\n");
+    }
+    msqid = -1;
+  }
+}
+
+void
+notify_entry_dir (unsigned int makelevel, const char *dir_name)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = ENTER_DIR;
+    message.dir_entry.level = makelevel;
+    SCPY(message.dir_entry.dir, dir_name);
+    send_message(&message);
+  }
+}
+
+void
+notify_exit_dir (void)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = EXIT_DIR;
+    send_message(&message);
+  }
+}
+
+void notify_entry_makefile(const char* name, int flags)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = ENTER_MAKEFILE;
+    SCPY(message.enter_make.name, name);
+    message.enter_make.flags = flags;
+    send_message(&message);
+  }
+}
+
+void notify_implicit_rule(const char* rule, int has_commands)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = IMPLICIT_RULE;
+    SCPY(message.implicit_rule.rule, rule);
+    message.implicit_rule.has_commands = has_commands;
+    send_message(&message);
+  }
+}
+
+void notify_begin_rule(int has_commands)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = BEGIN_RULE;
+    message.begin_rule.has_commands = has_commands;
+    send_message(&message);
+  }
+}
+
+void notify_rule_header(const char* header)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = RULE_HEADER;
+    SCPY(message.rule_header.header, header);
+    send_message(&message);
+  }
+}
+
+void notify_end_rule(void)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = END_RULE;
+    send_message(&message);
+  }
+}
+
+void notify_exit_makefile(void)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = EXIT_MAKEFILE;
+    send_message(&message);
+  }
+}
+
+static unsigned int count_array(char* arr[])
+{
+    unsigned int i;
+    
+    i=0;
+    while (arr[i] != NULL)
+	i++;
+	
+    return i;
+}
+
+static void send_args_array(char* arr[])
+{
+    unsigned int i;
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = CMD_ARG;
+    
+    i=0;
+    while (arr[i] != NULL)
+    {
+	SCPY(message.cmd_arg.arg, arr[i]);
+	send_message(&message);
+	i++;
+    }
+}
+
+void notify_before_command(char* argv[], char* env[])
+{
+  if (msqid != -1)
+  {
+    unsigned int i;
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = BEFORE_CMD;
+    
+    message.before_cmd.argc = count_array(argv);
+    message.before_cmd.envc = count_array(env);
+
+    send_message(&message);
+    
+    /* send args */
+    send_args_array(argv);
+    send_args_array(env);
+  }
+}
+
+void notify_command_failure(int err)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = CMD_FAILURE;
+    message.cmd_failure.err = err;
+    send_message(&message);
+  }
+}
+
+void notify_after_command(int sig, int ret)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = AFTER_CMD;
+    message.after_cmd.sig = sig;
+    message.after_cmd.ret = ret;
+    send_message(&message);
+  }
+}
+
+void notify_var_define(const char* varname, const char* value, int origin)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = VAR_DEFINE;
+    SCPY(message.var_def.varname, varname);
+    SCPY(message.var_def.varvalue, value);
+    message.var_def.origin = origin;
+    send_message(&message);
+  }
+}
+
+void notify_var_lookup(const char* varname, const char* value, int origin)  /* value == NULL means not found */
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = VAR_LOOKUP;
+    SCPY(message.var_lookup.varname, varname);
+    if (value != NULL)
+    {
+	SCPY(message.var_lookup.varvalue, value);
+	message.var_lookup.succeeded = 1;
+    }
+    else
+	message.var_lookup.succeeded = 0;
+	
+    message.var_lookup.origin = origin;
+    send_message(&message);
+  }
+}
+
+void notify_var_append(const char* varname, const char* oldvalue, const char* appending, int origin)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = VAR_APPEND;
+    SCPY(message.var_append.varname, varname);
+    SCPY(message.var_append.oldvalue, oldvalue);
+    SCPY(message.var_append.append, appending);
+    message.var_append.origin = origin;
+    send_message(&message);
+  }
+}
+
+/*
+void notify_goal_seek(const char* goal)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = GOAL_SEEK;
+    SCPY(message.goal_seek.goal, goal);
+    send_message(&message);
+  }
+}
+*/
+
+void notify_entry_rule(const char* rule) 
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = ENTER_RULE;
+    SCPY(message.rule_enter.rule, rule);
+    send_message(&message);
+  }
+}
+
+void notify_exit_rule(void)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = EXIT_RULE;
+    send_message(&message);
+  }
+}
+
+void notify_function_call(const char* function_name)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = FUNCTION_CALL;
+    SCPY(message.function_call.function_name, function_name);
+    send_message(&message);
+  }
+}
+
+void notify_ifdef_eval(const char* target, const char* exp, int negated, int result)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = IFDEF_EVAL;
+    SCPY(message.ifdef_eval.target, target);
+    SCPY(message.ifdef_eval.expanded, exp);
+    message.ifdef_eval.negated = negated;
+    message.ifdef_eval.result = result;
+    send_message(&message);
+  }
+}
+
+void notify_ifeq_eval(const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result)
+{
+  if (msqid != -1)
+  {
+    struct plugin_msg message;
+    message.mtype = 2;
+    message.func_index = IFEQ_EVAL;
+    SCPY(message.ifeq_eval.operand1, op1);
+    SCPY(message.ifeq_eval.operand2, op2);
+    SCPY(message.ifeq_eval.expanded1, exp1);
+    SCPY(message.ifeq_eval.expanded2, exp2);
+    message.ifeq_eval.negated = negated;
+    message.ifeq_eval.result = result;
+    send_message(&message);
+  }
+}
+
+#endif
diff -NaubB ./make-3.81/plugin_support.h ./make-3.81g/plugin_support.h
--- ./make-3.81/plugin_support.h	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/plugin_support.h	2007-12-12 13:46:46.000000000 -0300
@@ -0,0 +1,76 @@
+#ifndef PLUGIN_SUPPORT_H
+#define PLUGIN_SUPPORT_H
+
+#if defined(_AMIGA) || defined(WINDOWS32) || defined(__EMX__) || defined(__MSDOS__)
+#  define PLUGIN_SUPPORT 0
+#else
+#  define PLUGIN_SUPPORT 1
+#endif
+
+
+#if PLUGIN_SUPPORT
+
+#define PLUGIN_OK	0
+#define	PLUGIN_ERROR	-1
+
+/* these functions are for the top-level makefile */
+int launch_plugin(const char* plugin_name, const char* args);
+/*void close_plugin(void);*/
+
+/* these functions are for the nested makefiles */
+void connect_to_plugin(int mq);
+void disconnect_from_plugin(int keep_alive);
+
+/* ============================== EVENTS ========================== */
+void notify_entry_dir(unsigned int makelevel, const char* dir_name);
+void notify_exit_dir(void);
+
+void notify_entry_makefile(const char* name, int flags);
+void notify_implicit_rule(const char* rule, int has_commands);
+void notify_begin_rule(int has_commands);
+void notify_rule_header(const char* header);
+void notify_end_rule(void);
+void notify_exit_makefile(void);
+void notify_ifdef_eval(const char* target, const char* exp, int negated, int result);
+void notify_ifeq_eval(const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result);
+
+void notify_var_define(const char* varname, const char* value, int origin);
+void notify_var_lookup(const char* varname, const char* value, int origin);  /* value == NULL means not found */
+void notify_var_append(const char* varname, const char* oldvalue, const char* appending, int origin);
+
+void notify_entry_rule(const char* rule);
+void notify_exit_rule(void);
+
+void notify_before_command(char* argv[], char* env[]);
+void notify_command_failure(int err);
+void notify_after_command(int sig, int ret);
+
+void notify_function_call(const char* function_name);
+
+#else /* no plugin support because this is not UNIX */
+
+#define connect_to_plugin(mq)
+#define disconnect_from_plugin(keep_alive)
+#define notify_entry_dir(makelevel, dir_name)
+#define notify_exit_dir()
+#define notify_entry_makefile(name, flags)
+#define notify_implicit_rule(rule, has_commands)
+#define notify_begin_rule(has_commands)
+#define notify_rule_header(header)
+#define notify_end_rule()
+#define notify_exit_makefile()
+#define notify_ifdef_eval(target, exp, negated, result)
+#define notify_ifeq_eval(op1, op2, exp1, exp2, negated, result)
+#define notify_var_define(varname, value, origin)
+#define notify_var_lookup(varname, value, origin)
+#define notify_var_append(varname, oldvalue, appending, origin)
+#define notify_entry_rule(rule)
+#define notify_exit_rule()
+#define notify_before_command(argv, env)
+#define notify_command_failure(err)
+#define notify_after_command(sig, ret)
+#define notify_function_call(function_name)
+
+#endif
+
+#endif
Common subdirectories: ./make-3.81/po and ./make-3.81g/po
diff -NaubB ./make-3.81/read.c ./make-3.81g/read.c
--- ./make-3.81/read.c	2006-03-17 11:24:20.000000000 -0300
+++ ./make-3.81g/read.c	2007-12-11 12:33:30.000000000 -0300
@@ -30,6 +30,7 @@
 #include "rule.h"
 #include "debug.h"
 #include "hash.h"
+#include "plugin_support.h"
 
 
 #ifndef WINDOWS32
@@ -307,6 +308,8 @@
   int makefile_errno;
   int r;
 
+  notify_entry_makefile(filename, flags);
+  
   ebuf.floc.filenm = strcache_add (filename);
   ebuf.floc.lineno = 1;
 
@@ -409,6 +412,7 @@
 
   free (ebuf.bufstart);
   alloca (0);
+  notify_exit_makefile();
   return r;
 }
 
@@ -1579,6 +1583,8 @@
       conditionals->ignoring[o] =
         ((v != 0 && *v->value != '\0') == (cmdtype == c_ifndef));
 
+      notify_ifdef_eval(line, var, (cmdtype == c_ifndef), !conditionals->ignoring[o]);
+      
       free (var);
     }
   else
@@ -1587,6 +1593,7 @@
       char *s1, *s2;
       unsigned int len;
       char termin = *line == '(' ? ',' : *line;
+      char *operand1, *operand2;
 
       if (termin != ',' && termin != '"' && termin != '\'')
 	return -1;
@@ -1622,6 +1629,7 @@
       else
 	*line++ = '\0';
 
+      operand1 = strdup(s1);
       s2 = variable_expand (s1);
       /* We must allocate a new copy of the expanded string because
 	 variable_expand re-uses the same buffer.  */
@@ -1671,8 +1679,13 @@
       if (*line != '\0')
 	EXTRANEOUS ();
 
+      operand2 = strdup(s2);
       s2 = variable_expand (s2);
       conditionals->ignoring[o] = (streq (s1, s2) == (cmdtype == c_ifneq));
+      
+      notify_ifeq_eval(operand1, operand2, s1, s2, (cmdtype == c_ifneq), !conditionals->ignoring[o]);
+      free(operand1);
+      free(operand2);
     }
 
  DONE:
@@ -1896,6 +1909,7 @@
   else
     cmds = 0;
 
+  notify_begin_rule(commands_idx > 0);
   for (; filenames != 0; filenames = nextf)
     {
       char *name = filenames->name;
@@ -1903,6 +1917,7 @@
       struct dep *this = 0;
       char *implicit_percent;
 
+      notify_rule_header(name);
       nextf = filenames->next;
       free (filenames);
 
@@ -2118,6 +2133,8 @@
         default_goal_file = f;
     }
 
+  notify_end_rule();    
+
   if (implicit)
     {
       targets[target_idx] = 0;
diff -NaubB ./make-3.81/remake.c ./make-3.81g/remake.c
--- ./make-3.81/remake.c	2006-03-19 23:36:37.000000000 -0300
+++ ./make-3.81g/remake.c	2007-12-11 13:06:19.000000000 -0300
@@ -23,6 +23,7 @@
 #include "dep.h"
 #include "variable.h"
 #include "debug.h"
+#include "plugin_support.h"
 
 #include <assert.h>
 
@@ -757,9 +759,15 @@
       file->ignore_vpath = 1;
     }
 
+  if (rebuilding_makefiles == 0)
+    notify_entry_rule(file->name);
+  
   /* Now, take appropriate actions to remake the file.  */
   remake_file (file);
 
+  if (rebuilding_makefiles == 0)
+    notify_exit_rule();
+
   if (file->command_state != cs_finished)
     {
       DBF (DB_VERBOSE, _("Commands of `%s' are being run.\n"));
diff -NaubB ./make-3.81/sample_plugin2.c ./make-3.81g/sample_plugin2.c
--- ./make-3.81/sample_plugin2.c	1969-12-31 21:00:00.000000000 -0300
+++ ./make-3.81g/sample_plugin2.c	2007-12-11 16:17:29.000000000 -0300
@@ -0,0 +1,236 @@
+#include <stdio.h>
+#include "plugin.h"
+
+FILE* f;
+unsigned int level = 0;
+unsigned int rule_has_commands;
+
+/* plugin implementation */
+
+static void EnterDirectory (unsigned int makelevel, const char *directory);
+static void ExitDirectory  (void);
+static void ClosePlugin    (void);
+static void VarDefine      (const char* varname, const char* value, int origin);
+static void VarLookup      (const char* varname, const char* value, int origin);
+static void VarAppend      (const char* varname, const char* oldvalue, const char* appending, int origin);
+static void FuncCall       (const char* function);
+static void EnterMakefile  (const char* name, int flags);
+static void EnterRule      (int has_commands);
+static void RuleHeader     (const char* header);
+static void ExitRule       (void);
+static void ExitMakefile   (void);
+static void GoalSeek       (const char* goal);
+static void ProcessRuleIn  (const char* rule);
+static void ProcessRuleOut (void);
+static void CmdBefore      (const char* argv[], unsigned int argc, const char* env[], unsigned int envc);
+static void CmdAfter       (int sig, int ret);
+
+static void IfDefEval      (const char* target, const char* exp, int negated, int result);
+static void IfEqEval       (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result);
+
+
+
+static void TAB(void)
+{
+    int i;
+    for (i=0; i<level; i++)
+	fprintf(f, "\t");
+}
+
+/* Plugins shall implement the following function:
+*/
+void
+initialize_plugin (const char *argument, struct Plugin_data *data)
+{
+  data->enter_directory_callback = EnterDirectory;
+  data->exit_directory_callback = ExitDirectory;
+  data->close_plugin_callback = ClosePlugin;
+  /*
+  data->var_define_callback = VarDefine;
+  data->var_lookup_callback = VarLookup;
+  data->var_append_callback = VarAppend;
+  data->begin_makefile_callback = EnterMakefile;
+  data->begin_parse_rule = EnterRule;
+  data->parse_rule_header = RuleHeader;
+  data->end_parse_rule = ExitRule;
+  data->end_makefile_callback = ExitMakefile;
+
+  data->function_call_callback = FuncCall;
+    */
+  
+  /*data->goal_seek_callback = GoalSeek;*/
+  
+  data->rule_enter_callback = ProcessRuleIn;
+  data->rule_exit_callback = ProcessRuleOut;
+  
+  data->before_command_callback = CmdBefore;
+  data->after_command_callback = CmdAfter;
+
+  data->ifdef_eval_callback = IfDefEval;
+  data->ifeq_eval_callback = IfEqEval;
+    
+  f = fopen("plugin.log", "wt");
+}
+
+
+static void
+EnterDirectory (unsigned int makelevel, const char *directory)
+{
+  TAB();
+  fprintf (f, "Plugin: Entering dir %s, level %d\n", directory, makelevel);
+  /*level++;*/
+}
+
+static void
+ExitDirectory (void)
+{
+  /*level--;*/
+  TAB();
+  fprintf (f, "Plugin: Exiting dir\n");
+}
+
+static void
+ClosePlugin ()
+{
+  fprintf (f, "Plugin: Closing\n");
+  fclose(f);
+}
+
+static void
+VarDefine (const char* varname, const char* value, int origin)
+{
+  TAB();
+  fprintf (f, "Plugin: %s = '%s' at %d\n", varname, value, origin);
+}
+
+static void
+VarLookup (const char* varname, const char* value, int origin)
+{
+  TAB();
+  if (value != 0)
+      fprintf (f, "Plugin: var lookup: %s = '%s' at %d\n", varname, value, origin);
+  else
+      fprintf (f, "Plugin: var %s lookup FAILED\n", varname);
+}
+
+static void
+VarAppend (const char* varname, const char* oldvalue, const char* appending, int origin)
+{
+  TAB();
+  fprintf (f, "Plugin: %s += '%s' at %d (old='%s')\n", varname, appending, origin, oldvalue);
+}
+
+static void
+FuncCall (const char* function)
+{
+  TAB();
+  fprintf (f, "Plugin: call to %s\n", function);
+}
+
+static void
+EnterMakefile  (const char* name, int flags)
+{
+  TAB();
+  fprintf(f, "Plugin: enter makefile '%s' flags=%d\n", name, flags);
+  /*level++;*/
+}
+
+static void
+EnterRule (int has_commands)
+{
+    TAB();
+    rule_has_commands = has_commands;
+}
+
+static void
+RuleHeader (const char* header)
+{
+    fprintf(f, "%s ", header);
+}
+
+static void
+ExitRule (void)
+{
+    if (rule_has_commands)
+	fprintf(f, ": {}\n");
+    else
+	fprintf(f, ": {CMDS}\n");
+}
+
+static void
+ExitMakefile (void)
+{
+    TAB();
+    fprintf(f, "Plugin: exit makefile\n");
+    /*level--;*/
+}
+
+static void
+ProcessRuleIn (const char* rule)
+{
+    TAB();
+    fprintf(f, "Plugin: processing rule '%s'\n", rule);
+    level++;
+}
+
+static void
+ProcessRuleOut (void)
+{
+    level--;
+    TAB();
+    fprintf(f, "Plugin: processing rule out\n");
+}
+
+
+static void
+CmdBefore (const char* argv[], unsigned int argc, const char* env[], unsigned int envc)
+{
+    unsigned int i;
+    TAB();
+    fprintf(f, "Plugin: before execute '%s'\n", argv[0]);
+    TAB();
+    fprintf(f, "\tARGS: ");
+    for(i=1; i<argc; i++)
+	fprintf(f, "%s ", argv[i]);
+    fprintf(f, "\n");
+#if 0
+    TAB();
+    fprintf(f, "\tENV: ");
+    for(i=0; i<envc; i++)
+	fprintf(f, "%s ", env[i]);
+    fprintf(f, "\n");
+#endif
+}
+
+static void
+CmdAfter (int sig, int ret)
+{
+    TAB();
+    if (sig != 0 || ret != 0)
+	fprintf(f, "Plugin: command failed, returned %d, sig %d\n", ret, sig);
+    else
+	fprintf(f, "Plugin: after execute, returned %d\n", ret);
+}
+
+static void
+IfDefEval (const char* target, const char* exp, int negated, int result)
+{
+    TAB();
+    fprintf(f, "%s %s (='%s') returned %s\n", 
+	(negated ? "IFNDEF" : "IFDEF"),
+	target, 
+	exp, 
+	(result ? "TRUE" : "FALSE"));
+}
+
+static void
+IfEqEval (const char* op1, const char* op2, const char* exp1, const char* exp2, int negated, int result)
+{
+    TAB();
+    fprintf(f, "%s %s == %s ('%s' == '%s') returned %s\n", 
+	(negated ? "IFNEQ" : "IFEQ"),
+	op1, op2,
+	exp1, exp2,
+	(result ? "TRUE" : "FALSE"));
+}
+
Common subdirectories: ./make-3.81/tests and ./make-3.81g/tests
diff -NaubB ./make-3.81/variable.c ./make-3.81g/variable.c
--- ./make-3.81/variable.c	2006-03-08 17:15:08.000000000 -0300
+++ ./make-3.81g/variable.c	2007-12-11 13:06:28.000000000 -0300
@@ -30,6 +30,8 @@
 #include "pathstuff.h"
 #endif
 #include "hash.h"
+#include "plugin_support.h"
+
 
 /* Chain of all pattern-specific variables.  */
 
@@ -168,6 +170,8 @@
   struct variable **var_slot;
   struct variable var_key;
 
+  notify_var_define(name, value, origin);
+  
   if (set == NULL)
     set = &global_variable_set;
 
@@ -341,10 +346,14 @@
 {
   const struct variable_set_list *setlist;
   struct variable var_key;
+  char* const copied_name = (char*)malloc(length+1);
 
   var_key.name = (char *) name;
   var_key.length = length;
 
+  memcpy(copied_name, name, length);
+  copied_name[length] = 0;
+  
   for (setlist = current_variable_set_list;
        setlist != 0; setlist = setlist->next)
     {
@@ -353,8 +362,12 @@
 
       v = (struct variable *) hash_find_item ((struct hash_table *) &set->table, &var_key);
       if (v)
+      {
+        notify_var_lookup(copied_name, v->value, v->origin);
+	free(copied_name);
 	return v->special ? handle_special_var (v) : v;
     }
+    }
 
 #ifdef VMS
   /* since we don't read envp[] on startup, try to get the
@@ -403,15 +416,21 @@
               }
 
             *nptr = '\0';
+    	    notify_var_lookup(copied_name, nvalue, o_env);
+	    free(copied_name);
             return define_variable (vname, length, nvalue, o_env, 1);
 
           }
 
+    	notify_var_lookup(copied_name, value, o_env);
+	free(copied_name);
         return define_variable (vname, length, value, o_env, 1);
       }
   }
 #endif /* VMS */
 
+  notify_var_lookup(copied_name, 0, 0);
+  free(copied_name);
   return 0;
 }
 
Common subdirectories: ./make-3.81/w32 and ./make-3.81g/w32
