Index: src/timezone/Makefile
===================================================================
RCS file: /cvsroot/pgsql/src/timezone/Makefile,v
retrieving revision 1.30
diff -c -c -r1.30 Makefile
*** src/timezone/Makefile	5 Jan 2009 10:25:59 -0000	1.30
--- src/timezone/Makefile	6 Jan 2009 02:06:26 -0000
***************
*** 38,49 ****
  all: submake-libpgport zic
  endif
  
  zic: $(ZICOBJS)
  	$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
  
  install: all installdirs
  ifeq (,$(with_system_tzdata))
! 	$(if $(ZIC),$(ZIC),./zic) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
  endif
  	$(MAKE) -C tznames $@
  
--- 38,57 ----
  all: submake-libpgport zic
  endif
  
+ # We could do this test in the action section:
+ #	$(if $(ZIC),$(ZIC),./zic)
+ # but gmake versions <= 3.78.1 or perhaps later have a bug
+ # that causes a segfault;  gmake 3.81 or later fixes this.
+ ifeq (,$(ZIC))
+ ZIC= ./zic
+ endif
+ 
  zic: $(ZICOBJS)
  	$(CC) $(CFLAGS) $(ZICOBJS) $(LDFLAGS) $(LIBS) -o $@$(X)
  
  install: all installdirs
  ifeq (,$(with_system_tzdata))
! 	$(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
  endif
  	$(MAKE) -C tznames $@
  
