Annotation of embedaddon/php/sapi/fpm/config.m4, revision 1.1.1.3.2.1.2.1
1.1 misho 1: dnl
1.1.1.3.2.1.2 1(misho 2:4): dnl $Id: config.m4,v 1.1.1.3.2.1 2013/10/14 08:17:38 misho Exp $
1.1 misho 3: dnl
4:
5: PHP_ARG_ENABLE(fpm,,
1.1.1.2 misho 6: [ --enable-fpm Enable building of the fpm SAPI executable], no, no)
1.1 misho 7:
8: dnl configure checks {{{
9: AC_DEFUN([AC_FPM_STDLIBS],
10: [
11: AC_CHECK_FUNCS(setenv clearenv setproctitle)
12:
13: AC_SEARCH_LIBS(socket, socket)
14: AC_SEARCH_LIBS(inet_addr, nsl)
15:
16: AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h])
17: AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/time.h])
18: AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
1.1.1.3 misho 19: AC_CHECK_HEADERS([sysexits.h])
1.1 misho 20: ])
21:
22: AC_DEFUN([AC_FPM_PRCTL],
23: [
24: AC_MSG_CHECKING([for prctl])
25:
26: AC_TRY_COMPILE([ #include <sys/prctl.h> ], [prctl(0, 0, 0, 0, 0);], [
27: AC_DEFINE([HAVE_PRCTL], 1, [do we have prctl?])
28: AC_MSG_RESULT([yes])
29: ], [
30: AC_MSG_RESULT([no])
31: ])
32: ])
33:
34: AC_DEFUN([AC_FPM_CLOCK],
35: [
36: have_clock_gettime=no
37:
38: AC_MSG_CHECKING([for clock_gettime])
39:
40: AC_TRY_LINK([ #include <time.h> ], [struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);], [
41: have_clock_gettime=yes
42: AC_MSG_RESULT([yes])
43: ], [
44: AC_MSG_RESULT([no])
45: ])
46:
47: if test "$have_clock_gettime" = "no"; then
48: AC_MSG_CHECKING([for clock_gettime in -lrt])
49:
50: SAVED_LIBS="$LIBS"
51: LIBS="$LIBS -lrt"
52:
53: AC_TRY_LINK([ #include <time.h> ], [struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);], [
54: have_clock_gettime=yes
55: AC_MSG_RESULT([yes])
56: ], [
57: LIBS="$SAVED_LIBS"
58: AC_MSG_RESULT([no])
59: ])
60: fi
61:
62: if test "$have_clock_gettime" = "yes"; then
63: AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [do we have clock_gettime?])
64: fi
65:
66: have_clock_get_time=no
67:
68: if test "$have_clock_gettime" = "no"; then
69: AC_MSG_CHECKING([for clock_get_time])
70:
71: AC_TRY_RUN([ #include <mach/mach.h>
72: #include <mach/clock.h>
73: #include <mach/mach_error.h>
74:
75: int main()
76: {
77: kern_return_t ret; clock_serv_t aClock; mach_timespec_t aTime;
78: ret = host_get_clock_service(mach_host_self(), REALTIME_CLOCK, &aClock);
79:
80: if (ret != KERN_SUCCESS) {
81: return 1;
82: }
83:
84: ret = clock_get_time(aClock, &aTime);
85: if (ret != KERN_SUCCESS) {
86: return 2;
87: }
88:
89: return 0;
90: }
91: ], [
92: have_clock_get_time=yes
93: AC_MSG_RESULT([yes])
94: ], [
95: AC_MSG_RESULT([no])
96: ])
97: fi
98:
99: if test "$have_clock_get_time" = "yes"; then
100: AC_DEFINE([HAVE_CLOCK_GET_TIME], 1, [do we have clock_get_time?])
101: fi
102: ])
103:
104: AC_DEFUN([AC_FPM_TRACE],
105: [
106: have_ptrace=no
107: have_broken_ptrace=no
108:
109: AC_MSG_CHECKING([for ptrace])
110:
111: AC_TRY_COMPILE([
112: #include <sys/types.h>
113: #include <sys/ptrace.h> ], [ptrace(0, 0, (void *) 0, 0);], [
114: have_ptrace=yes
115: AC_MSG_RESULT([yes])
116: ], [
117: AC_MSG_RESULT([no])
118: ])
119:
120: if test "$have_ptrace" = "yes"; then
121: AC_MSG_CHECKING([whether ptrace works])
122:
123: AC_TRY_RUN([
124: #include <unistd.h>
125: #include <signal.h>
126: #include <sys/wait.h>
127: #include <sys/types.h>
128: #include <sys/ptrace.h>
129: #include <errno.h>
130:
131: #if !defined(PTRACE_ATTACH) && defined(PT_ATTACH)
132: #define PTRACE_ATTACH PT_ATTACH
133: #endif
134:
135: #if !defined(PTRACE_DETACH) && defined(PT_DETACH)
136: #define PTRACE_DETACH PT_DETACH
137: #endif
138:
139: #if !defined(PTRACE_PEEKDATA) && defined(PT_READ_D)
140: #define PTRACE_PEEKDATA PT_READ_D
141: #endif
142:
143: int main()
144: {
145: long v1 = (unsigned int) -1; /* copy will fail if sizeof(long) == 8 and we've got "int ptrace()" */
146: long v2;
147: pid_t child;
148: int status;
149:
150: if ( (child = fork()) ) { /* parent */
151: int ret = 0;
152:
153: if (0 > ptrace(PTRACE_ATTACH, child, 0, 0)) {
154: return 2;
155: }
156:
157: waitpid(child, &status, 0);
158:
159: #ifdef PT_IO
160: struct ptrace_io_desc ptio = {
161: .piod_op = PIOD_READ_D,
162: .piod_offs = &v1,
163: .piod_addr = &v2,
164: .piod_len = sizeof(v1)
165: };
166:
167: if (0 > ptrace(PT_IO, child, (void *) &ptio, 0)) {
168: ret = 3;
169: }
170: #else
171: errno = 0;
172:
173: v2 = ptrace(PTRACE_PEEKDATA, child, (void *) &v1, 0);
174:
175: if (errno) {
176: ret = 4;
177: }
178: #endif
179: ptrace(PTRACE_DETACH, child, (void *) 1, 0);
180:
181: kill(child, SIGKILL);
182:
183: return ret ? ret : (v1 != v2);
184: }
185: else { /* child */
186: sleep(10);
187: return 0;
188: }
189: }
190: ], [
191: AC_MSG_RESULT([yes])
192: ], [
193: have_ptrace=no
194: have_broken_ptrace=yes
195: AC_MSG_RESULT([no])
1.1.1.3 misho 196: ], [
197: AC_MSG_RESULT([skipped (cross compiling)])
1.1 misho 198: ])
199: fi
200:
201: if test "$have_ptrace" = "yes"; then
202: AC_DEFINE([HAVE_PTRACE], 1, [do we have ptrace?])
203: fi
204:
205: have_mach_vm_read=no
206:
207: if test "$have_broken_ptrace" = "yes"; then
208: AC_MSG_CHECKING([for mach_vm_read])
209:
210: AC_TRY_COMPILE([ #include <mach/mach.h>
211: #include <mach/mach_vm.h>
212: ], [
213: mach_vm_read((vm_map_t)0, (mach_vm_address_t)0, (mach_vm_size_t)0, (vm_offset_t *)0, (mach_msg_type_number_t*)0);
214: ], [
215: have_mach_vm_read=yes
216: AC_MSG_RESULT([yes])
217: ], [
218: AC_MSG_RESULT([no])
219: ])
220: fi
221:
222: if test "$have_mach_vm_read" = "yes"; then
223: AC_DEFINE([HAVE_MACH_VM_READ], 1, [do we have mach_vm_read?])
224: fi
225:
226: proc_mem_file=""
227:
228: if test -r /proc/$$/mem ; then
229: proc_mem_file="mem"
230: else
231: if test -r /proc/$$/as ; then
232: proc_mem_file="as"
233: fi
234: fi
235:
236: if test -n "$proc_mem_file" ; then
237: AC_MSG_CHECKING([for proc mem file])
238:
239: AC_TRY_RUN([
240: #define _GNU_SOURCE
241: #define _FILE_OFFSET_BITS 64
242: #include <stdint.h>
243: #include <unistd.h>
244: #include <sys/types.h>
245: #include <sys/stat.h>
246: #include <fcntl.h>
247: #include <stdio.h>
248: int main()
249: {
250: long v1 = (unsigned int) -1, v2 = 0;
251: char buf[128];
252: int fd;
253: sprintf(buf, "/proc/%d/$proc_mem_file", getpid());
254: fd = open(buf, O_RDONLY);
255: if (0 > fd) {
256: return 1;
257: }
258: if (sizeof(long) != pread(fd, &v2, sizeof(long), (uintptr_t) &v1)) {
259: close(fd);
260: return 1;
261: }
262: close(fd);
263: return v1 != v2;
264: }
265: ], [
266: AC_MSG_RESULT([$proc_mem_file])
267: ], [
268: proc_mem_file=""
269: AC_MSG_RESULT([no])
1.1.1.3 misho 270: ], [
271: AC_MSG_RESULT([skipped (cross compiling)])
1.1 misho 272: ])
273: fi
274:
275: if test -n "$proc_mem_file"; then
276: AC_DEFINE_UNQUOTED([PROC_MEM_FILE], "$proc_mem_file", [/proc/pid/mem interface])
277: fi
278:
279: fpm_trace_type=""
280:
281: if test "$have_ptrace" = "yes"; then
282: fpm_trace_type=ptrace
283:
284: elif test -n "$proc_mem_file"; then
285: fpm_trace_type=pread
286:
287: elif test "$have_mach_vm_read" = "yes" ; then
288: fpm_trace_type=mach
289:
290: else
291: AC_MSG_WARN([FPM Trace - ptrace, pread, or mach: could not be found])
292: fi
293:
294: ])
295:
296: AC_DEFUN([AC_FPM_BUILTIN_ATOMIC],
297: [
298: AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap])
299: AC_TRY_LINK(,
300: [
301: int variable = 1;
302: return (__sync_bool_compare_and_swap(&variable, 1, 2)
303: && __sync_add_and_fetch(&variable, 1)) ? 1 : 0;
304: ],
305: [
306: AC_MSG_RESULT([yes])
307: AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.])
308: ],
309: [
310: AC_MSG_RESULT([no])
311: ])
312: ])
313:
314: AC_DEFUN([AC_FPM_LQ],
315: [
316: have_lq=no
317:
318: AC_MSG_CHECKING([for TCP_INFO])
319:
1.1.1.3.2.1.2 1(misho 320:4): AC_TRY_COMPILE([ #include <netinet/tcp.h> ], [struct tcp_info ti; int x = TCP_INFO;], [
1.1 misho 321: have_lq=tcp_info
322: AC_MSG_RESULT([yes])
323: ], [
324: AC_MSG_RESULT([no])
325: ])
326:
327: if test "$have_lq" = "tcp_info"; then
328: AC_DEFINE([HAVE_LQ_TCP_INFO], 1, [do we have TCP_INFO?])
329: fi
330:
331: if test "$have_lq" = "no" ; then
332: AC_MSG_CHECKING([for SO_LISTENQLEN])
333:
334: AC_TRY_COMPILE([ #include <sys/socket.h> ], [int x = SO_LISTENQLIMIT; int y = SO_LISTENQLEN;], [
335: have_lq=so_listenq
336: AC_MSG_RESULT([yes])
337: ], [
338: AC_MSG_RESULT([no])
339: ])
340:
1.1.1.3.2.1.2 1(misho 341:4): if test "$have_lq" = "tcp_info"; then
1.1 misho 342: AC_DEFINE([HAVE_LQ_SO_LISTENQ], 1, [do we have SO_LISTENQxxx?])
343: fi
344: fi
345: ])
346: dnl }}}
347:
348: AC_DEFUN([AC_FPM_SYSCONF],
349: [
350: AC_MSG_CHECKING([for sysconf])
351:
352: AC_TRY_COMPILE([ #include <unistd.h> ], [sysconf(_SC_CLK_TCK);], [
353: AC_DEFINE([HAVE_SYSCONF], 1, [do we have sysconf?])
354: AC_MSG_RESULT([yes])
355: ], [
356: AC_MSG_RESULT([no])
357: ])
358: ])
359: dnl }}}
360:
361: AC_DEFUN([AC_FPM_TIMES],
362: [
363: AC_MSG_CHECKING([for times])
364:
365: AC_TRY_COMPILE([ #include <sys/times.h> ], [struct tms t; times(&t);], [
366: AC_DEFINE([HAVE_TIMES], 1, [do we have times?])
367: AC_MSG_RESULT([yes])
368: ], [
369: AC_MSG_RESULT([no])
370: ])
371: ])
372: dnl }}}
373:
374: AC_DEFUN([AC_FPM_KQUEUE],
375: [
376: AC_MSG_CHECKING([for kqueue])
377:
378: AC_TRY_COMPILE(
379: [
380: #include <sys/types.h>
381: #include <sys/event.h>
382: #include <sys/time.h>
383: ], [
384: int kfd;
385: struct kevent k;
386: kfd = kqueue();
387: /* 0 -> STDIN_FILENO */
388: EV_SET(&k, 0, EVFILT_READ , EV_ADD | EV_CLEAR, 0, 0, NULL);
389: ], [
390: AC_DEFINE([HAVE_KQUEUE], 1, [do we have kqueue?])
391: AC_MSG_RESULT([yes])
392: ], [
393: AC_MSG_RESULT([no])
394: ])
395: ])
396: dnl }}}
397:
398: AC_DEFUN([AC_FPM_PORT],
399: [
400: AC_MSG_CHECKING([for port framework])
401:
402: AC_TRY_COMPILE(
403: [
404: #include <port.h>
405: ], [
406: int port;
407:
408: port = port_create();
409: if (port < 0) {
410: return 1;
411: }
412: ], [
413: AC_DEFINE([HAVE_PORT], 1, [do we have port framework?])
414: AC_MSG_RESULT([yes])
415: ], [
416: AC_MSG_RESULT([no])
417: ])
418: ])
419: dnl }}}
420:
421: AC_DEFUN([AC_FPM_DEVPOLL],
422: [
423: AC_MSG_CHECKING([for /dev/poll])
424:
425: AC_TRY_COMPILE(
426: [
427: #include <stdio.h>
428: #include <sys/devpoll.h>
429: ], [
430: int n, dp;
431: struct dvpoll dvp;
432: dp = 0;
433: dvp.dp_fds = NULL;
434: dvp.dp_nfds = 0;
435: dvp.dp_timeout = 0;
436: n = ioctl(dp, DP_POLL, &dvp)
437: ], [
438: AC_DEFINE([HAVE_DEVPOLL], 1, [do we have /dev/poll?])
439: AC_MSG_RESULT([yes])
440: ], [
441: AC_MSG_RESULT([no])
442: ])
443: ])
444: dnl }}}
445:
446: AC_DEFUN([AC_FPM_EPOLL],
447: [
448: AC_MSG_CHECKING([for epoll])
449:
450: AC_TRY_COMPILE(
451: [
452: #include <sys/epoll.h>
453: ], [
454: int epollfd;
455: struct epoll_event e;
456:
457: epollfd = epoll_create(1);
458: if (epollfd < 0) {
459: return 1;
460: }
461:
462: e.events = EPOLLIN | EPOLLET;
463: e.data.fd = 0;
464:
465: if (epoll_ctl(epollfd, EPOLL_CTL_ADD, 0, &e) == -1) {
466: return 1;
467: }
468:
469: e.events = 0;
470: if (epoll_wait(epollfd, &e, 1, 1) < 0) {
471: return 1;
472: }
473: ], [
474: AC_DEFINE([HAVE_EPOLL], 1, [do we have epoll?])
475: AC_MSG_RESULT([yes])
476: ], [
477: AC_MSG_RESULT([no])
478: ])
479: ])
480: dnl }}}
481:
482: AC_DEFUN([AC_FPM_POLL],
483: [
484: AC_MSG_CHECKING([for poll])
485:
486: AC_TRY_COMPILE(
487: [
488: #include <poll.h>
489: ], [
490: struct pollfd fds[2];
491:
492: fds[0].fd = 0;
493: fds[0].events = POLLIN;
494:
495: fds[1].fd = 0;
496: fds[1].events = POLLIN;
497:
498: poll(fds, 2, 1);
499: ], [
500: AC_DEFINE([HAVE_POLL], 1, [do we have poll?])
501: AC_MSG_RESULT([yes])
502: ], [
503: AC_MSG_RESULT([no])
504: ])
505: ])
506: dnl }}}
507:
508: AC_DEFUN([AC_FPM_SELECT],
509: [
510: AC_MSG_CHECKING([for select])
511:
512: AC_TRY_COMPILE(
513: [
514: /* According to POSIX.1-2001 */
515: #include <sys/select.h>
516:
517: /* According to earlier standards */
518: #include <sys/time.h>
519: #include <sys/types.h>
520: #include <unistd.h>
521: ], [
522: fd_set fds;
523: struct timeval t;
524: t.tv_sec = 0;
525: t.tv_usec = 42;
526: FD_ZERO(&fds);
527: /* 0 -> STDIN_FILENO */
528: FD_SET(0, &fds);
529: select(FD_SETSIZE, &fds, NULL, NULL, &t);
530: ], [
531: AC_DEFINE([HAVE_SELECT], 1, [do we have select?])
532: AC_MSG_RESULT([yes])
533: ], [
534: AC_MSG_RESULT([no])
535: ])
536: ])
537: dnl }}}
538:
539:
540: AC_MSG_CHECKING(for FPM build)
541: if test "$PHP_FPM" != "no"; then
542: AC_MSG_RESULT($PHP_FPM)
543:
544: AC_FPM_STDLIBS
545: AC_FPM_PRCTL
546: AC_FPM_CLOCK
547: AC_FPM_TRACE
548: AC_FPM_BUILTIN_ATOMIC
549: AC_FPM_LQ
550: AC_FPM_SYSCONF
551: AC_FPM_TIMES
552: AC_FPM_KQUEUE
553: AC_FPM_PORT
554: AC_FPM_DEVPOLL
555: AC_FPM_EPOLL
556: AC_FPM_POLL
557: AC_FPM_SELECT
558:
559: PHP_ARG_WITH(fpm-user,,
560: [ --with-fpm-user[=USER] Set the user for php-fpm to run as. (default: nobody)], nobody, no)
561:
562: PHP_ARG_WITH(fpm-group,,
563: [ --with-fpm-group[=GRP] Set the group for php-fpm to run as. For a system user, this
564: should usually be set to match the fpm username (default: nobody)], nobody, no)
565:
1.1.1.3 misho 566: PHP_ARG_WITH(fpm-systemd,,
567: [ --with-fpm-systemd Activate systemd integration], no, no)
568:
569: if test "$PHP_FPM_SYSTEMD" != "no" ; then
570: AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
571: AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
572: if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then
573: AC_MSG_ERROR([Your system does not support systemd.])
574: else
575: AC_DEFINE(HAVE_SYSTEMD, 1, [FPM use systemd integration])
576: PHP_FPM_SD_FILES="fpm/fpm_systemd.c"
577: PHP_ADD_LIBRARY(systemd-daemon)
578: php_fpm_systemd=notify
579: fi
580: else
581: php_fpm_systemd=simple
582: fi
583: PHP_SUBST_OLD(php_fpm_systemd)
584: AC_DEFINE_UNQUOTED(PHP_FPM_SYSTEMD, "$php_fpm_systemd", [fpm systemd service type])
585:
1.1 misho 586: if test -z "$PHP_FPM_USER" -o "$PHP_FPM_USER" = "yes" -o "$PHP_FPM_USER" = "no"; then
587: php_fpm_user="nobody"
588: else
589: php_fpm_user="$PHP_FPM_USER"
590: fi
591:
592: if test -z "$PHP_FPM_GROUP" -o "$PHP_FPM_GROUP" = "yes" -o "$PHP_FPM_GROUP" = "no"; then
593: php_fpm_group="nobody"
594: else
595: php_fpm_group="$PHP_FPM_GROUP"
596: fi
597:
598: PHP_SUBST_OLD(php_fpm_user)
599: PHP_SUBST_OLD(php_fpm_group)
600: php_fpm_sysconfdir=`eval echo $sysconfdir`
601: PHP_SUBST_OLD(php_fpm_sysconfdir)
602: php_fpm_localstatedir=`eval echo $localstatedir`
603: PHP_SUBST_OLD(php_fpm_localstatedir)
604: php_fpm_prefix=`eval echo $prefix`
605: PHP_SUBST_OLD(php_fpm_prefix)
606:
607: AC_DEFINE_UNQUOTED(PHP_FPM_USER, "$php_fpm_user", [fpm user name])
608: AC_DEFINE_UNQUOTED(PHP_FPM_GROUP, "$php_fpm_group", [fpm group name])
609:
1.1.1.3 misho 610: AC_DEFINE_UNQUOTED(PHP_FPM_USER, "$php_fpm_user", [fpm user name])
611: AC_DEFINE_UNQUOTED(PHP_FPM_GROUP, "$php_fpm_group", [fpm group name])
612:
1.1.1.2 misho 613: PHP_ADD_BUILD_DIR(sapi/fpm/fpm)
614: PHP_ADD_BUILD_DIR(sapi/fpm/fpm/events)
1.1.1.3 misho 615: PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
1.1.1.2 misho 616: PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
1.1 misho 617:
618: SAPI_FPM_PATH=sapi/fpm/php-fpm
1.1.1.3 misho 619:
1.1 misho 620:
621: if test "$fpm_trace_type" && test -f "$abs_srcdir/sapi/fpm/fpm/fpm_trace_$fpm_trace_type.c"; then
622: PHP_FPM_TRACE_FILES="fpm/fpm_trace.c fpm/fpm_trace_$fpm_trace_type.c"
623: fi
624:
625: PHP_FPM_CFLAGS="-I$abs_srcdir/sapi/fpm"
626:
627: PHP_FPM_FILES="fpm/fastcgi.c \
628: fpm/fpm.c \
629: fpm/fpm_children.c \
630: fpm/fpm_cleanup.c \
631: fpm/fpm_clock.c \
632: fpm/fpm_conf.c \
633: fpm/fpm_env.c \
634: fpm/fpm_events.c \
635: fpm/fpm_log.c \
636: fpm/fpm_main.c \
637: fpm/fpm_php.c \
638: fpm/fpm_php_trace.c \
639: fpm/fpm_process_ctl.c \
640: fpm/fpm_request.c \
641: fpm/fpm_shm.c \
642: fpm/fpm_scoreboard.c \
643: fpm/fpm_signals.c \
644: fpm/fpm_sockets.c \
645: fpm/fpm_status.c \
646: fpm/fpm_stdio.c \
647: fpm/fpm_unix.c \
648: fpm/fpm_worker_pool.c \
649: fpm/zlog.c \
650: fpm/events/select.c \
651: fpm/events/poll.c \
652: fpm/events/epoll.c \
653: fpm/events/kqueue.c \
654: fpm/events/devpoll.c \
655: fpm/events/port.c \
656: "
657:
1.1.1.3 misho 658: PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES $PHP_FPM_SD_FILES, $PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)')
1.1 misho 659:
660: case $host_alias in
661: *aix*)
1.1.1.2 misho 662: BUILD_FPM="echo '\#! .' > php.sym && echo >>php.sym && nm -BCpg \`echo \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) | sed 's/\([A-Za-z0-9_]*\)\.lo/\1.o/g'\` | \$(AWK) '{ if (((\$\$2 == \"T\") || (\$\$2 == \"D\") || (\$\$2 == \"B\")) && (substr(\$\$3,1,1) != \".\")) { print \$\$3 } }' | sort -u >> php.sym && \$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) -Wl,-brtl -Wl,-bE:php.sym \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
1.1 misho 663: ;;
664: *darwin*)
1.1.1.2 misho 665: BUILD_FPM="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_BINARY_OBJS:.lo=.o) \$(PHP_FPM_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
1.1 misho 666: ;;
667: *)
1.1.1.2 misho 668: BUILD_FPM="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_FPM_OBJS) \$(EXTRA_LIBS) \$(FPM_EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_FPM_PATH)"
1.1 misho 669: ;;
670: esac
671:
1.1.1.2 misho 672: PHP_SUBST(SAPI_FPM_PATH)
1.1 misho 673: PHP_SUBST(BUILD_FPM)
1.1.1.2 misho 674:
1.1 misho 675: else
676: AC_MSG_RESULT(no)
677: fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>