home *** CD-ROM | disk | FTP | other *** search
/ ftp.uv.es / 2014.11.ftp.uv.es.tar / ftp.uv.es / pub / unix / pine4.10.tar.gz / pine4.10.tar / pine4.10 / imap / Makefile < prev    next >
Makefile  |  1999-01-27  |  13KB  |  422 lines

  1. # Program:    IMAP Toolkit Makefile
  2. #
  3. # Author:    Mark Crispin
  4. #        Networks and Distributed Computing
  5. #        Computing & Communications
  6. #        University of Washington
  7. #        Administration Building, AG-44
  8. #        Seattle, WA  98195
  9. #        Internet: MRC@CAC.Washington.EDU
  10. #
  11. # Date:        7 December 1989
  12. # Last Edited:    27 January 1998
  13. #
  14. # Copyright 1998 by the University of Washington
  15. #
  16. #  Permission to use, copy, modify, and distribute this software and its
  17. # documentation for any purpose and without fee is hereby granted, provided
  18. # that the above copyright notice appears in all copies and that both the
  19. # above copyright notice and this permission notice appear in supporting
  20. # documentation, and that the name of the University of Washington not be
  21. # used in advertising or publicity pertaining to distribution of the software
  22. # without specific, written prior permission.  This software is made
  23. # available "as is", and
  24. # THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  25. # WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  26. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  27. # NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  28. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  29. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  30. # (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  31. # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  32.  
  33.  
  34. # *** TEMPORARY FOR PINE 4.10 BUILD ***
  35. GSSDIR=/usr/local
  36. # *** TEMPORARY FOR PINE 4.10 BUILD ***
  37.  
  38. # Normal command to build IMAP toolkit:
  39. #  make <port> [EXTRAAUTHENTICATORS=xxx] [EXTRADRIVERS=xxx] [PASSWDTYPE=xxx]
  40.  
  41.  
  42. # Extra authenticators (e.g. OTP, Kerberos, etc.).  Adds linkage for
  43. # auth_xxx.c and executes Makefile.xxx, where xxx is the name of the
  44. # authenticator.  Some authenticators are only available from third parties.
  45.  
  46. EXTRAAUTHENTICATORS=
  47.  
  48.  
  49. # The following extra drivers are defined:
  50. # mbox    if file "mbox" exists on the home directory, automatically moves mail
  51. #     from the spool directory to "mbox" and uses "mbox" as INBOX.
  52.  
  53. EXTRADRIVERS=mbox
  54.  
  55.  
  56. # The following plaintext login types are defined:
  57. # afs    AFS authentication database
  58. # dce    DCE authentication database
  59. # md5    MD5 database (must also have md5 as an authenticator)
  60. # nul    no plaintext authentication (note: this will break some secure
  61. #     authenticators -- don't use without checking first!!)
  62. # std    system standard (typically passwd file), determined by port
  63.  
  64. PASSWDTYPE=std
  65.  
  66.  
  67. # The following special compilation flags are defined.  None of these flags are
  68. # recommended.
  69. #
  70. # -DDISABLE_POP_PROXY=1
  71. #    By default, the ipop[23]d servers offer POP->IMAP proxy access,
  72. #    which allow a POP client to access mail on an IMAP server by using the
  73. #    POP server as a go-between.  Setting this option disables this
  74. #    facility.
  75. #
  76. # -DDISABLE_REVERSE_DNS_LOOKUP=1
  77. #    Never do gethostbyaddr() calls on sockets in the client and server.
  78. #    By default, the servers (ipop[23]d and imapd) will do gethostbyaddr()
  79. #    on the local and remote sockets so that imapd can identify itself
  80. #    properly (this is important when the same CPU hosts multiple virtual
  81. #    hosts on different IP addresss) and also includes the client's name
  82. #    when it writes to the syslog.  There are also client gethostbyaddr()
  83. #    calls, used primarily by authentication mechanisms.
  84. #
  85. #    Setting this option disables all gethostbyaddr() calls.  The returned
  86. #    "host name" string for the socket is just the bracketed [12.34.56.78]
  87. #    form, as if the reverse DNS lookup failed.
  88. #
  89. #    WARNING: Some authentication mechanisms, e.g. Kerberos V, depend upon
  90. #    the host names being right, and if you set this option, it won't work.
  91. #
  92. #    You should only do this if you are encountering server performance
  93. #    problems due to a misconfigured DNS, e.g. long startup delays or
  94. #    client timeouts.
  95. #
  96. # -DIGNORE_LOCK_EACCES_ERRORS=1
  97. #    Disable the "Mailbox vulnerable -- directory must have 1777 protection"
  98. #    warning which occurs if an attempt to create a mailbox lock file
  99. #    fails due to an EACCES error.
  100. #
  101. #    WARNING: If the mail delivery program uses mailbox lock files and the
  102. #    mail spool directory is not protected 1777, there is no protection
  103. #    against mail being delivered while the mailbox is being rewritten in a
  104. #    checkpoint or an expunge.  The result is a corrupted mailbox file
  105. #    and/or lost mail.  The warning message is the *ONLY* indication that
  106. #    the user will receive that this could be happening.  Disabling the
  107. #    warning just sweeps the problem under the rug.
  108. #
  109. #    There are only a small minority of BSD-style systems in which the mail
  110. #    delivery program does not use mailbox lock files.  Linux is *NOT* one
  111. #    of these systems.  Do *NOT* set this option on Linux or SVR4.
  112. #
  113. # -DSVR4_DISABLE_FLOCK=1
  114. #    Disable emulation of the BSD flock() system call on SVR4 systems in all
  115. #    unconditionally.  By default, this only happens for NFS files (to avoid
  116. #    problems with the broken "statd" and "lockd" daemons).
  117. #
  118. #    WARNING: This disables protection against two processes accessing the
  119. #    same mailbox file simultaneously, and can result in corrupted
  120. #    mailboxes, aborted sessions, and core dumps.
  121. #
  122. #    There should be no reason ever to do this, since the flock() emulation
  123. #    checks for NFS files.
  124. #
  125. # -DOLDFILESUFFIX="xxx"
  126. #    Change the default suffix appended to the backup .newsrc file from
  127. #    "old".
  128. #
  129. # -DSTRICT_RFC822_TIMEZONES=1
  130. #    Disable recognition of the UTC (0000), MET (+0100), EET (+0200),
  131. #    JST (+0900), ADT (-0300), AST (-0400), YDT (-0800), YST (-0900), and
  132. #    HST (-1000) symbolic timezones.
  133. #
  134. # -DBRITISH_SUMMER_TIME=1
  135. #    Enables recognition of non-standard symbolic timezone BST as +0100.
  136. #
  137. # -DBERING_STANDARD_TIME=1
  138. #    Enables recognition of non-standard symbolic timezone BST as -1100.
  139. #
  140. # -DNEWFOUNDLAND_STANDARD_TIME=1
  141. #    Enables recognition of non-standard symbolic timezone NST as -0330.
  142. #
  143. # -DNOME_STANDARD_TIME=1
  144. #    Enables recognition of non-standard symbolic timezone NST as -1100.
  145. #
  146. # -DSAMOA_STANDARD_TIME=1
  147. #    Enables recognition of non-standard symbolic timezone SST as -1100.
  148. #                
  149. # -DY4KBUGFIX=1
  150. #    Turn on the Y4K bugfix (yes, that's year 4000).  It isn't well-known,
  151. #    but century years evenly divisible by 4000 are *not* leap years in the
  152. #    Gregorian calendar.  A lot of "Y2K compilant" software does not know
  153. #    about this rule.  Remember to turn this on sometime in the next 2000
  154. #    years.
  155. #
  156. # -DUSEORTHODOXCALENDAR=1
  157. #    Use the more accurate Eastern Orthodox calendar instead of the
  158. #    Gregorian calendar.  The century years which are leap years happen
  159. #    at alternating 400 and 500 year intervals without shifts every 4000
  160. #    years.  The Orthodox and Gregorian calendars diverge by 1 day for
  161. #    gradually-increasing intervals, starting at 2800-2900, and becoming
  162. #    permanent at 48,300.
  163.  
  164. EXTRASPECIALS=
  165.  
  166.  
  167. # Miscellaneous command options passed down to the c-client Makefile
  168.  
  169. EXTRACFLAGS=
  170. EXTRALDFLAGS=
  171.  
  172.  
  173. # Normal commands
  174.  
  175. CAT=cat
  176. CD=cd
  177. LN=ln -s
  178. MAKE=make
  179. MKDIR=mkdir
  180. RM=rm -rf
  181. SH=sh
  182. SYSTEM=unix
  183. TOOLS=tools
  184. TOUCH=touch
  185.  
  186.  
  187. # Primary build command
  188.  
  189. BUILDOPTIONS= EXTRACFLAGS="$(EXTRACFLAGS)"\
  190.  EXTRALDFLAGS="$(EXTRALDFLAGS)"\
  191.  EXTRADRIVERS="$(EXTRADRIVERS)" EXTRAAUTHENTICATORS="$(EXTRAAUTHENTICATORS)"\
  192.  PASSWDTYPE=$(PASSWDTYPE)
  193. #BUILD=$(MAKE) build $(BUILDOPTIONS)
  194. # *** TEMPORARY FOR PINE 4.10 BUILD ***
  195. BUILD=$(MAKE) build $(BUILDOPTIONS) GSSDIR=$(GSSDIR)
  196. # *** TEMPORARY FOR PINE 4.10 BUILD ***
  197.  
  198.  
  199. # Make the IMAP Toolkit
  200.  
  201. all:    c-client rebuild bundled
  202.  
  203.  
  204. #  The following ports are defined.  These refer to the *standard* compiler
  205. # on the given system.  This means, for example, that the sol port is for SUN's
  206. # compiler and not for a non-standard compiler such as gcc.
  207. #  If you are using gcc and it is not the standard compiler on your system, try
  208. # using an ANSI port that is close to what you have.  For example, if your
  209. # system is SVR4ish, try a32 or lnx; if it's more BSDish, try nxt, mct, or bsi.
  210. #
  211. # a32    AIX 3.2 for RS/6000
  212. # a41    AIX 4.1 for RS/6000
  213. # aix    AIX/370
  214. # ami    AmigaDOS
  215. # am2    AmigaDOS with a 68020+
  216. # ama    AmigaDOS using AS225R2
  217. # amn    AmigaDOS with a 680x0 using "new" socket library
  218. # aos    AOS for RT
  219. # art    AIX 2.2.1 for RT
  220. # asv    Altos SVR4
  221. # aux    A/UX
  222. # bs3    BSD/i386 3.0 and higher
  223. # bsd    generic BSD
  224. # bsf    FreeBSD
  225. # bsi    BSD/i386
  226. # bso    OpenBSD (yes, yet another one...)
  227. # cvx    Convex
  228. # d-g    Data General DG/UX prior to 5.4 (d41 port no longer exists)
  229. # d54    Data General DG/UX 5.4
  230. # dpx    Bull DPX/2 B.O.S.
  231. # drs    ICL DRS/NX
  232. # dyn    Dynix
  233. # epx    EP/IX
  234. # gas    GCC Altos SVR4
  235. # gh9   GCC HP-UX 9.x
  236. # ghp    GCC HP-UX 10.x
  237. # gs5    GCC 2.7.1 (95q4 from Skunkware _not_ 98q2!) SCO Open Server 5.0.x
  238. # gso    GCC Solaris
  239. # gsu    GCC SUN-OS
  240. # gul    GCC RISC Ultrix (DEC-5000)
  241. # hpp    HP-UX 9.x
  242. # hpx    HP-UX 10.x
  243. # hxd    HP-UX 10.x with DCE security
  244. # isc    Interactive Systems
  245. # lnx    Linux with traditional passwords and crypt() in the C library
  246. # lnp    Linux with Pluggable Authentication Modules (PAM)
  247. # lyn    LynxOS
  248. # mct    MachTen
  249. # mnt    Atari ST Mint (not MacMint)
  250. # neb    NetBSD/FreeBSD
  251. # nxt    NEXTSTEP
  252. # nx3    NEXTSTEP 3.x
  253. # osf    OSF/1
  254. # os4    OSF/1 (Digital UNIX) 4
  255. # ptx    PTX
  256. # pyr    Pyramid
  257. # qnx    QNX 4
  258. # s40    SUN-OS 4.0
  259. # sc5    SCO Open Server 5.0.x
  260. # sco    Santa Cruz Operation
  261. # shp    HP-UX with Trusted Computer Base
  262. # sgi    Silicon Graphics IRIX
  263. # sl4    Linux using -lshadow to get the crypt() function
  264. # sl5    Linux with shadow passwords, no extra libraries
  265. # slx    Linux using -lcrypt to get the crypt() function
  266. # snx    Siemens Nixdorf SININX or Reliant UNIX
  267. # sol    Solaris (won't work unless "ucbcc" works -- use gso instead)
  268. # sos    OSF/1 with SecureWare
  269. # ssn    SUN-OS with shadow password security
  270. # sun    SUN-OS 4.1 or better
  271. # sv2    SVR2 on AT&T PC-7300 (incomplete port)
  272. # sv4    generic SVR4
  273. # ult    RISC Ultrix (DEC-5000)
  274. # uw2    UnixWare SVR4.2
  275. # vul    VAX Ultrix
  276. # vu2    VAX Ultrix 2.3 (e.g. for VAXstation-2000 or similar old version)
  277.  
  278. c-client:
  279.     @echo Not processed yet.  In a first-time build, you must specify
  280.     @echo the system type so that the sources are properly processed.
  281.     @false
  282.  
  283.  
  284. # Note on SCO you may have to set LN to "ln".
  285.  
  286. a32 a41 aix bs3 bsf bsi bso d-g d54 drs epx gas gh9 ghp gs5 gso gsu gul hpp hpx lnp lyn mct mnt neb nxt nx3 osf os4 ptx qnx sc5 sco sgi shp sl4 sl5 slx snx sol sos uw2: an
  287.     $(BUILD) OS=$@
  288.  
  289. # If you use sv4, you may find that it works to move it to use the an process.
  290. # If so, you probably will want to delete the "-Dconst=" from the sv4 CFLAGS in
  291. # the c-client Makefile.
  292.  
  293. aos art asv aux bsd cvx dpx dyn isc pyr s40 sv4 ult vul vu2: ua
  294.     $(BUILD) OS=$@
  295.  
  296. # Linux shadow password support doesn't build on traditional systems, but most
  297. # Linux systems are shadow these days.
  298.  
  299. lnx:    lnxmd5 an
  300.     $(BUILD) OS=$@
  301.  
  302. lnxmd5:
  303.     @sh -c '(test $(PASSWDTYPE) = md5) || make lnxok'
  304.  
  305. lnxok:
  306.     @echo You are building for traditional Linux.  Most modern Linux
  307.     @echo systems require that you build using make slx.  Do you want
  308.     @echo to continue this build?  Type y or n please:
  309.     @sh -c 'read x; case "$$x" in y) exit 0;; *) exit 1;; esac'
  310.     @echo OK, I will remember that you really want to build for
  311.     @echo traditional Linux.  You will nott see this message again.
  312.     @echo If you discover that you can not log in to the POP and IMAP
  313.     @echo servers, then do the following commands:
  314.     @echo % rm lnxok
  315.     @echo % make clean
  316.     @echo % make slx
  317.     @echo If slx does not work, try sl4 or sl5.  Be sure to do a
  318.     @echo make clean between each try!
  319.     @touch lnxok
  320.  
  321.  
  322. # SUN-OS makes you load libdl by hand...
  323.  
  324. ssn sun: suntools ua
  325.     $(BUILD) OS=$@
  326.  
  327. suntools:
  328.     $(CD) tools;$(MAKE) LDFLAGS=-ldl
  329.  
  330.  
  331. # SVR2 doesn't have symbolic links (at least my SVR2 system doesn't)
  332.  
  333. sv2:
  334.     $(MAKE) ua LN=ln
  335.     $(BUILD) OS=$@ LN=ln
  336.  
  337.  
  338. # Pine port names, not distinguished in c-client
  339.  
  340. bs2:    an
  341.     $(BUILD) OS=bsi
  342.  
  343. pt1:    an
  344.     $(BUILD) OS=ptx
  345.  
  346.  
  347. # Compatibility
  348.  
  349. hxd:    # Gotta do this one the hard way
  350.     $(MAKE) hpx PASSWDTYPE=dce
  351.  
  352. # Amiga
  353.  
  354. ami am2 ama amn:
  355.     $(MAKE) an LN=cp SYSTEM=amiga
  356.     $(BUILD) OS=$@ LN=cp
  357.  
  358.  
  359. # Courtesy entry for NT
  360.  
  361. nt:
  362.     nmake /nologo -f makefile.nt
  363.  
  364. ntk:
  365.     nmake /nologo -f makefile.ntk
  366.  
  367. # Courtesy entry for WCE
  368.  
  369. wce:
  370.     nmake /nologo -f makefile.wce
  371.  
  372.  
  373. # C compiler types
  374.  
  375. an ua:
  376.     @echo Applying $@ process to sources...
  377.     $(TOOLS)/$@ "$(LN)" src/c-client c-client
  378.     $(TOOLS)/$@ "$(LN)" src/ansilib c-client
  379.     $(TOOLS)/$@ "$(LN)" src/charset c-client
  380.     sh -c '(test -d src/kerberos) && ($(LN) `pwd`/src/kerberos/* c-client) || true'
  381.     $(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
  382.     $(TOOLS)/$@ "$(LN)" src/mtest mtest
  383.     $(TOOLS)/$@ "$(LN)" src/ipopd ipopd
  384.     $(TOOLS)/$@ "$(LN)" src/imapd imapd
  385.     $(LN) $(TOOLS)/$@ .
  386.  
  387. build:    OSTYPE rebuild rebuildclean bundled
  388.  
  389. OSTYPE:
  390.     @echo Building c-client for $(OS)...
  391.     echo $(EXTRASPECIALS) > c-client/EXTRASPECIALS
  392. # *** TEMPORARY FOR PINE 4.10 BUILD ***
  393.     echo GSSDIR=$(GSSDIR) >> c-client/EXTRASPECIALS
  394. # *** TEMPORARY FOR PINE 4.10 BUILD ***
  395.     $(CD) c-client;$(MAKE) $(OS) BUILDOPTIONS='$(BUILDOPTIONS)' $(EXTRASPECIALS)
  396.     echo $(OS) > OSTYPE
  397.     $(TOUCH) rebuild
  398.  
  399. rebuild:
  400.     @echo Rebuilding c-client for `cat OSTYPE`...
  401.     $(TOUCH) c-client/EXTRASPECIALS
  402.     $(CD) c-client;$(MAKE) all CC=`cat CCTYPE` CFLAGS="`cat CFLAGS`" `cat EXTRASPECIALS`
  403.  
  404. rebuildclean:
  405.     sh -c '$(RM) rebuild || true'
  406.  
  407. bundled:
  408.     @echo Building bundled tools...
  409.     $(CD) mtest;$(MAKE)
  410.     $(CD) ipopd;$(MAKE)
  411.     $(CD) imapd;$(MAKE)
  412.  
  413. clean:
  414.     @echo Removing old processed sources and binaries...
  415.     sh -c '$(RM) an ua OSTYPE c-client mtest imapd ipopd || true'
  416.     $(CD) tools;$(MAKE) clean
  417.  
  418.  
  419. # A monument to a hack of long ago and far away...
  420. love:
  421.     @echo not war?
  422.