pyconfigure

(Brandon Invergo)
2012-09-12: update AC_LANG_PROGRAM to avoid the need for a MAIN

update AC_LANG_PROGRAM to avoid the need for a MAIN

diff --git a/m4/python.m4 b/m4/python.m4
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -57,9 +57,9 @@ AU_DEFUN([AC_LANG_PYTHON], [AC_LANG(Pyth
 m4_define([AC_LANG_PROGRAM(Python)], [dnl
 @%:@!$PYTHON
 $1
+m4_if([$2], [], [], [dnl
 if __name__ == '__main__':
-$2
-])
+$2])])
 
 
 # _AC_LANG_IO_PROGRAM(Python)
@@ -75,9 +75,7 @@ except:
 else:
     close(h)
     sys.exit(0)
-], [
-    pass
-])])
+], [])])
 
 
 # _AC_LANG_CALL(Python)([PROLOGUE], [FUNCTION])
@@ -505,9 +503,7 @@ except:
     sys.exit(1)
 else:
     sys.exit(0)
-], [
-    pass
-])],
+], [])],
 	[[pc_cv_python_module_]pc_python_safe_mod="yes"],
 	[[pc_cv_python_module_]pc_python_safe_mod="no"])
      AC_LANG_POP(Python)[]dnl