--- geant4.6.0/fink.sh	1969-12-31 16:00:00.000000000 -0800
+++ geant4.6.0.new/fink.sh	2004-01-17 11:44:39.000000000 -0800
@@ -0,0 +1,65 @@
+g4clhep_base_dir='@PREFIX@'
+g4clhep_include_dir='@PREFIX@/include'
+g4clhep_lib='CLHEP'
+g4clhep_lib_dir='@PREFIX@/lib'
+g4compiler='g++'
+g4data='@PREFIX@/share/geant4/data'
+g4debug=''
+g4global='n'
+g4granular='y'
+g4include=''
+g4includes_flag='y'
+g4install='@BUILDDIR@'
+g4lib_build_dyn='y'
+g4lib_build_shared='n'
+g4lib_build_static='y'
+g4lib_use_granular='y'
+g4lib_use_shared='y'
+g4lib_use_static='n'
+g4make='make'
+g4osname='Darwin'
+g4system='Darwin-g++'
+g4ui_build_gag_session='y'
+g4ui_build_terminal_session='y'
+g4ui_build_win32_session='n'
+g4ui_build_xaw_session='n'
+g4ui_build_xm_session='y'
+g4ui_use_gag='y'
+g4ui_use_tcsh='y'
+g4ui_use_terminal='y'
+g4ui_use_win32='n'
+g4ui_use_xaw='n'
+g4ui_use_xm='y'
+g4vis_build_asciitree_driver='y'
+g4vis_build_dawn_driver='y'
+g4vis_build_dawnfile_driver='y'
+g4vis_build_oiwin32_driver='n'
+g4vis_build_oix_driver='n'
+g4vis_build_openglwin32_driver='n'
+g4vis_build_openglx_driver='y'
+g4vis_build_openglxm_driver='y'
+g4vis_build_raytracer_driver='y'
+g4vis_build_vrml_driver='y'
+g4vis_build_vrmlfile_driver='y'
+g4vis_oglhome='/usr/X11R6/'
+g4vis_use_asciitree='y'
+g4vis_use_dawn='y'
+g4vis_use_dawnfile='y'
+g4vis_use_oiwin32='n'
+g4vis_use_oix='n'
+g4vis_use_openglwin32='n'
+g4vis_use_openglx='y'
+g4vis_use_openglxm='y'
+g4vis_use_raytracer='y'
+g4vis_use_vrml='y'
+g4vis_use_vrmlfile='y'
+g4w_use_g3tog4='n'
+g4wanalysis_build=''
+g4wanalysis_build_jas=''
+g4wanalysis_build_lab=''
+g4wanalysis_build_lizard=''
+g4wanalysis_use='n'
+g4wanalysis_use_jas=''
+g4wanalysis_use_lab=''
+g4wanalysis_use_lizard=''
+g4wlib_build_g3tog4='n'
--- geant4.7.1.orig/Configure	2005-06-20 12:34:18.000000000 -0500
+++ geant4.7.1.new/Configure	2005-09-22 11:56:05.000000000 -0500
@@ -3136,7 +3136,7 @@
 	y*|Y*) 
 		g4lib_build_dyn=y
 		g4lib_build_shared=n
-		g4lib_build_static=n
+		g4lib_build_static=y
 
 #		g4lib_build_static=""
 #		g4lib_use_shared=1
--- geant4.7.1.orig/config/binmake.gmk	2005-06-15 08:59:59.000000000 -0500
+++ geant4.7.1.new/config/binmake.gmk	2005-09-23 22:09:23.000000000 -0500
@@ -145,7 +145,7 @@
 endif
 
 CPPFLAGS += $(INCFLAGS)
-LDFLAGS += -L$(G4LIBDIR)
+LDFLAGS += -L$(G4LIBDIR) -bind_at_load -multiply_defined suppress
 
 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(G4TARGET)
 G4BINDIR := $(G4BIN)/$(G4SYSTEM)
--- geant4.7.1.orig/config/sys/Darwin-g++.gmk	2005-05-17 03:07:27.000000000 -0500
+++ geant4.7.1.new/config/sys/Darwin-g++.gmk	2005-09-24 23:47:11.000000000 -0500
@@ -34,12 +34,10 @@
   FCLIBS := -lg2c -lnsl
   ECHO    := /bin/echo -n
   SHEXT   := dylib
-  X11FLAGS  := -I/usr/include/X11/extensions -I/usr/include/X11
+  X11FLAGS  := -I/usr/X11R6/include
   X11LIBS   := -L/usr/X11R6/lib  -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
-  XMFLAGS   := -I/sw/include
-#  XMFLAGS   := -I/usr/X11R6/include          ##### some installations.
-  XMLIBS    := -L/sw/lib -lXm -lXpm
-#  XMLIBS    := -L/usr/X11R6/lib -lXm -lXpm   ##### some installations.
+  XMFLAGS   := -I@PREFIX@/include
+  XMLIBS    := -L@PREFIX@/lib -lXm -lXpm
   DLDLIBS   := -ldl
   ifndef OGLHOME
     OGLHOME  := /usr/X11R6
@@ -66,37 +64,35 @@
 #   G.Barrand (16/07/2004)
 #
 ####  G4_MACOSX_TWO_LEVEL_NAMESPACE = 1
-ifdef G4_MACOSX_TWO_LEVEL_NAMESPACE
   define build-granular-shared-lib
     @libdir=`(cd $(@D);/bin/pwd)`; \
+     libname=`(echo $(@F) | /usr/bin/sed 's/\.dylib/.@VERSION@.dylib/')`; \
+     compversion=`(echo @VERSION@ | /usr/bin/cut -d'.' -f1-2)`; \
+     libs=`(/bin/ls -1 $$libdir/*$$compversion.dylib | /usr/bin/xargs -IFILE /usr/bin/basename FILE .$$compversion.dylib | /usr/bin/sed -n 's|^lib|-l|p')`; \
      cd $(G4TMPDIR); \
-     g++ -dynamiclib -twolevel_namespace -undefined define_a_way -dynamic \
-         -single_module -o $$libdir/$(@F) *.o -L$(G4LIB)/$(G4SYSTEM) \
-         -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS)
-  endef
-else
-  define build-granular-shared-lib
-    @libdir=`(cd $(@D);/bin/pwd)`; \
-     cd $(G4TMPDIR); \
-     g++ -dynamiclib -flat_namespace -undefined suppress  -dynamic -single_module -o $$libdir/$(@F) $(INTYLIBS) *.o
+     g++ -dynamiclib -twolevel_namespace -undefined error -dynamic \
+         -install_name @PREFIX@/lib/`echo $$libname | /usr/bin/cut -d'.' -f1-3`".dylib" \
+         -compatibility_version $$compversion -current_version @VERSION@ \
+         -single_module -o $$libdir/$$libname *.o -L$(G4LIB)/$(G4SYSTEM) $$libs \
+         -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS); \
+     /bin/ln -s $$libname $$libdir/`echo $$libname | /usr/bin/cut -d'.' -f1-3`".dylib"; \
+     /bin/ln -s $$libname $$libdir/`echo $$libname | /usr/bin/cut -d'.' -f1`".dylib"
   endef
-endif
-ifdef G4_MACOSX_TWO_LEVEL_NAMESPACE
   define build-global-shared-lib
     @libdir=`(cd $(@D);/bin/pwd)`; \
+     libname=`(echo $(@F) | /usr/bin/sed 's/\.dylib/.@VERSION@.dylib/')`; \
+     compversion=`(echo @VERSION@ | /usr/bin/cut -d'.' -f1-2)`; \
+     libs=`(/bin/ls -1 $$libdir/*$$compversion.dylib | /usr/bin/xargs -IFILE /usr/bin/basename FILE .$$compversion.dylib | /usr/bin/sed -n 's|^lib|-l|p')`; \
      cd $(G4TMP)/$(G4SYSTEM); \
      g++ -dynamiclib -twolevel_namespace -undefined error -dynamic \
-         -single_module -o $$libdir/$(@F) \
+         -install_name @PREFIX@/lib/`echo $$libname | /usr/bin/cut -d'.' -f1-3`".dylib" \
+         -compatibility_version $$compversion -current_version @VERSION@ \
+         -single_module -o $$libdir/$$libname $$libs \
          $(foreach dir,$(SUBLIBS),$(dir)/*.o) -L$(G4LIB)/$(G4SYSTEM) \
          $(patsubst lib%,-l%,$(patsubst %.lib,%,$(GLOBLIBS))) \
-         -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS);
+         -L$(CLHEP_LIB_DIR) -l$(CLHEP_LIB) $(INTYLIBS); \
+     /bin/ln -s $$libname $$libdir/`echo $$libname | /usr/bin/cut -d'.' -f1-3`".dylib"; \
+     /bin/ln -s $$libname $$libdir/`echo $$libname | /usr/bin/cut -d'.' -f1`".dylib"
   endef
-else
-  define build-global-shared-lib
-    @libdir=`(cd $(@D);/bin/pwd)`; \
-     cd $(G4TMP)/$(G4SYSTEM); \
-     g++ -dynamiclib -flat_namespace -undefined suppress  -dynamic -single_module -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
-  endef
-endif
 
 endif
