Add files from parent branch HEAD:
[pkgsrc.git] / mk / defs.AIX.mk
1 # $NetBSD: defs.AIX.mk,v 1.11 2004/06/18 11:22:41 kristerw Exp $
2 #
3 # Variable definitions for the AIX operating system.
4
5 AWK?=           /usr/bin/awk
6 BASENAME?=      /usr/bin/basename
7 CAT?=           /bin/cat
8 CHMOD?=         /bin/chmod
9 CHOWN?=         /usr/sbin/chown
10 CHGRP?=         /usr/bin/chgrp
11 CMP?=           /usr/bin/cmp
12 CP?=            /bin/cp
13 CPP?=       ${LOCALBASE}/bin/cpp
14 CUT?=           /usr/bin/cut
15 DATE?=          /bin/date
16 DC?=            /usr/bin/dc
17 DIRNAME?=       /usr/bin/dirname
18 ECHO?=          echo                            # Shell builtin
19 ECHO_N?=        ${ECHO} -n
20 .if exists(${LOCALBASE}/bin/egrep)
21 EGREP?=         ${LOCALBASE}/bin/egrep
22 .else
23 EGREP?=     /usr/bin/grep -E
24 .endif
25 EXPR?=          /bin/expr
26 FALSE?=         false                           # Shell builtin
27 FETCH_CMD?= ${LOCALBASE}/bin/ftp
28 .if exists(${LOCALBASE}/bin/fgrep)
29 FGREP?=         ${LOCALBASE}/bin/fgrep
30 .else
31 FGREP?=     /usr/bin/grep -F
32 .endif
33 FILE_CMD?=      /usr/bin/file
34 FIND?=          /usr/bin/find
35 GMAKE?=         ${LOCALBASE}/bin/gmake
36 .if exists(${LOCALBASE}/bin/grep)
37 GREP?=          ${LOCALBASE}/bin/grep
38 .else
39 GREP?=          /usr/bin/grep
40 .endif
41 .if exists(/bin/tar)
42 GTAR?=          /bin/tar
43 .else
44 GTAR?=          /usr/bin/tar
45 .endif
46 GUNZIP_CMD?=    ${LOCALBASE}/bin/gunzip -f
47 GZCAT?=         ${LOCALBASE}/bin/zcat
48 GZIP?=          -9
49 GZIP_CMD?=      ${LOCALBASE}/bin/gzip -nf ${GZIP}
50 HEAD?=          /usr/bin/head
51 HOSTNAME_CMD?=  /bin/hostname
52 ID?=            /usr/bin/id
53 #.if ${INSTALL} == "install"
54 INSTALL=   ${LOCALBASE}/bin/install-sh
55 #.endif
56 LDCONFIG?=      /sbin/ldconfig
57 LN?=            /bin/ln
58 LS?=            /bin/ls
59 M4?=            /usr/bin/m4
60 MAIL_CMD?=      /usr/bin/mailx
61 MKDIR?=         /bin/mkdir -p
62 MTREE?=         ${LOCALBASE}/sbin/mtree
63 MV?=            /bin/mv
64 NICE?=          /usr/bin/nice
65 PATCH?=         ${LOCALBASE}/bin/gpatch
66 .if exists(${LOCALBASE}/bin/pax)
67 PAX?=       ${LOCALBASE}/bin/pax
68 .else
69 PAX?=           /bin/pax
70 .endif
71 PERL5?=         ${LOCALBASE}/bin/perl
72 PKGLOCALEDIR?=  share
73 PS?=            /bin/ps
74 PWD_CMD?=       /bin/pwd        # needs to print physical path
75 RM?=            /bin/rm
76 RMDIR?=         /bin/rmdir
77 # XXX: default from bsd.pkg.defaults.mk.  Verify/corerct for this platform
78 # and remove this comment.
79 RSH?=           /usr/bin/rsh
80 .if exists(${LOCALBASE}/bin/nbsed)
81 SED?=           ${LOCALBASE}/bin/nbsed
82 .else
83 SED?=           /usr/bin/sed
84 .endif
85 SETENV?=        /usr/bin/env
86 SH?=            /bin/sh
87 SHLOCK=         /usr/bin/shlock
88 SORT?=          /usr/bin/sort
89 # AIX strip fails too easily.  Use a wrapper script instead
90 .if exists(${LOCALBASE}/bin/strip)
91 STRIP?=     ${LOCALBASE}/bin/strip
92 .endif
93 SU?=            /usr/bin/su
94 TAIL?=          /usr/bin/tail
95 .if exists(${LOCALBASE}/bin/tar)
96 TAR?=           ${LOCALBASE}/bin/tar
97 .else
98 TAR?=           /usr/bin/tar
99 .endif
100 TEE?=           /usr/bin/tee
101 TEST?=          test                            # Shell builtin
102 TOUCH?=         /usr/bin/touch
103 TR?=            /usr/bin/tr
104 TRUE?=          true                            # Shell builtin
105 TSORT?=         /usr/bin/tsort
106 TYPE?=          type                            # Shell builtin
107 WC?=            /usr/bin/wc
108 XARGS?=         /usr/bin/xargs
109
110 .if exists(/usr/sbin/user)
111 USERADD?=       /usr/sbin/useradd
112 GROUPADD?=      /usr/sbin/groupadd
113 .else
114 USERADD?=       ${LOCALBASE}/sbin/useradd
115 GROUPADD?=      ${LOCALBASE}/sbin/groupadd
116 _USER_DEPENDS=  user>=20000313:../../sysutils/user
117 DEPENDS+=       ${USE_USERADD:D${_USER_DEPENDS}}
118 DEPENDS+=       ${USE_GROUPADD:D${_USER_DEPENDS}}
119 .endif
120
121 CPP_PRECOMP_FLAGS?=     # unset
122 DEF_UMASK?=             0022
123 EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E  # add symbols to the dynamic symbol table
124 MOTIF_TYPE_DEFAULT?=    openmotif       # default 2.0 compatible libs type
125 NOLOGIN?=               /sbin/nologin
126 PKG_TOOLS_BIN?=         ${LOCALBASE}/sbin
127 ROOT_CMD?=              ${SU} - root -c
128 ROOT_USER?=             root
129 ROOT_GROUP?=    system
130 ULIMIT_CMD_datasize?=   ulimit -d `ulimit -H -d`
131 ULIMIT_CMD_stacksize?=  ulimit -s `ulimit -H -s`
132 ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m`
133
134 # imake installs manpages in weird places
135 # these values from /usr/X11R6/lib/X11/config/NetBSD.cf
136 IMAKE_MAN_SOURCE_PATH=  man/cat
137 IMAKE_MAN_SUFFIX=       1
138 IMAKE_LIBMAN_SUFFIX=    3
139 IMAKE_FILEMAN_SUFFIX=   5
140 IMAKE_MAN_DIR=          ${IMAKE_MAN_SOURCE_PATH}1
141 IMAKE_LIBMAN_DIR=       ${IMAKE_MAN_SOURCE_PATH}3
142 IMAKE_FILEMAN_DIR=      ${IMAKE_MAN_SOURCE_PATH}5
143 IMAKE_MANNEWSUFFIX=     0
144
145 _DO_SHLIB_CHECKS=       no      # fixup PLIST for shared libs/run ldconfig
146                                 # doesn't work on AIX b/c no ldd.
147 _IMAKE_MAKE=            ${MAKE} # program which gets invoked by imake
148 .if exists(/usr/include/netinet6)
149 _OPSYS_HAS_INET6=       yes     # IPv6 is standard
150 .else
151 _OPSYS_HAS_INET6=       no      # IPv6 is not standard
152 .endif
153 _OPSYS_HAS_JAVA=        no      # Java is not standard
154 _OPSYS_HAS_MANZ=        yes     # MANZ controls gzipping of man pages
155 _OPSYS_HAS_OSSAUDIO=    no      # libossaudio is available
156 _OPSYS_PERL_REQD=               # no base version of perl required
157 _OPSYS_PTHREAD_AUTO=    no      # -lpthread needed for pthreads
158 _OPSYS_SHLIB_TYPE=      aixlib  # type of shared lib
159 _PATCH_CAN_BACKUP=      yes     # native patch(1) can make backups
160 _PATCH_BACKUP_ARG?=     -b -V simple -z         # switch to patch(1) for backup suffix
161 _PREFORMATTED_MAN_DIR=  cat     # directory where catman pages are
162 _USE_GNU_GETTEXT=       no      # Don't use GNU gettext
163 _USE_RPATH=             yes     # add rpath to LDFLAGS
164
165 # flags passed to the linker to extract all symbols from static archives.
166 # this is GNU ld.
167 _OPSYS_WHOLE_ARCHIVE_FLAG=      -Wl,--whole-archive
168 _OPSYS_NO_WHOLE_ARCHIVE_FLAG=   -Wl,--no-whole-archive
169
170 # for programs which use dlopen()
171 # not necessary since 1.6 (shared libs are linked against libgcc_pic)
172 .if !empty(OS_VERSION:M1.5*)
173 LINK_ALL_LIBGCC_HACK=   -Wl,--whole-archive -lgcc -Wl,--no-whole-archive
174 .endif
175
176 .if !defined(DEBUG_FLAGS)
177 _STRIPFLAG_CC?=         -s      # cc(1) option to strip
178 _STRIPFLAG_INSTALL?=    -s      # install(1) option to strip
179 .endif
180
181 DEFAULT_SERIAL_DEVICE?= /dev/tty0
182 SERIAL_DEVICES?=        /dev/tty0 \
183                         /dev/tty
184
185 # check for maximum command line length and set it in configure's environment,
186 # to avoid a test required by the libtool script that takes forever.
187 # FIXME: Adjust to work on this system and enable the lines below.
188 #.if defined(GNU_CONFIGURE) && defined(USE_LIBTOOL)
189 #_OPSYS_MAX_CMDLEN!=    /sbin/sysctl -n kern.argmax
190 #CONFIGURE_ENV+=                lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN}
191 #.endif
192
193 # If games are to be installed setgid, then SETGIDGAME is set to 'yes'
194 # (it defaults to 'no' as per bsd.pkg.defaults.mk).
195 # Set the group and mode to meaningful values in that case (defaults to
196 # BINOWN, BINGRP and BINMODE as per bsd.pkg.defaults.mk).
197 # FIXME: Adjust to work on this system and enable the lines below.
198 #.if !(empty(SETGIDGAME:M[yY][eE][sS]))
199 #GAMEOWN=               games
200 #GAMEGRP=               games
201 #GAMEMODE=              2555
202 #.endif