OSDN Git Service

Once more, Allow building with either giflib 4.2 or 5.0.
[swfed/swfed.git] / src / config.m4
1 dnl $Id$
2 dnl config.m4 for extension swfed
3
4 dnl Comments in this file start with the string 'dnl'.
5 dnl Remove where necessary. This file will not work
6 dnl without editing.
7
8 dnl If your extension references something external, use with:
9
10 dnl PHP_ARG_WITH(swfed, for swfed support,
11 dnl Make sure that the comment is aligned:
12 dnl [  --with-swfed             Include swfed support])
13
14 dnl Otherwise use enable:
15
16 PHP_ARG_ENABLE(swfed, whether to enable swfed support,
17 Make sure that the comment is aligned:
18 [  --enable-swfed           Enable swfed support])
19
20 if test "$PHP_SWFED" != "no"; then
21   dnl Write more examples of tests here...
22
23   sinclude(config-lib.m4)
24
25   dnl # --with-swfed -> check with-path
26   dnl SEARCH_PATH="/usr/local /usr"     # you might want to change this
27   dnl SEARCH_FOR="/include/swfed.h"  # you most likely want to change this
28   dnl if test -r $PHP_SWFED/$SEARCH_FOR; then # path given as parameter
29   dnl   SWFED_DIR=$PHP_SWFED
30   dnl else # search default path list
31   dnl   AC_MSG_CHECKING([for swfed files in default path])
32   dnl   for i in $SEARCH_PATH ; do
33   dnl     if test -r $i/$SEARCH_FOR; then
34   dnl       SWFED_DIR=$i
35   dnl       AC_MSG_RESULT(found in $i)
36   dnl     fi
37   dnl   done
38   dnl fi
39   dnl
40   dnl if test -z "$SWFED_DIR"; then
41   dnl   AC_MSG_RESULT([not found])
42   dnl   AC_MSG_ERROR([Please reinstall the swfed distribution])
43   dnl fi
44
45   dnl # --with-swfed -> add include path
46   dnl PHP_ADD_INCLUDE($SWFED_DIR/include)
47
48   dnl # --with-swfed -> check for lib and symbol presence
49   dnl LIBNAME=swfed # you may want to change this
50   dnl LIBSYMBOL=swfed # you most likely want to change this 
51
52   dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
53   dnl [
54   dnl   PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SWFED_DIR/lib, SWFED_SHARED_LIBADD)
55   dnl   AC_DEFINE(HAVE_SWFEDLIB,1,[ ])
56   dnl ],[
57   dnl   AC_MSG_ERROR([wrong swfed lib version or lib not found])
58   dnl ],[
59   dnl   -L$SWFED_DIR/lib -lm -ldl
60   dnl ])
61   dnl
62   PHP_SUBST(SWFED_SHARED_LIBADD)
63
64   PHP_NEW_EXTENSION(swfed, php_swfed.c \
65         swf_object.c swf_header.c swf_tag.c bitstream.c swf_debug.c \
66         swf_jpeg.c jpeg_segment.c bitmap_util.c swf_png.c swf_gif.c \
67         swf_rgb.c swf_rgba.c swf_argb.c swf_xrgb.c \
68         swf_rect.c swf_matrix.c swf_action.c \
69         swf_shape_with_style.c swf_styles.c swf_fill_style_array.c \
70         swf_fill_style.c swf_fill_style_solid.c swf_fill_style_gradient.c \
71         swf_fill_style_bitmap.c swf_morph_shape_with_style.c \
72         swf_line_style_array.c swf_line_style.c swf_styles_count.c \
73         swf_shape_record.c swf_shape_record_end.c swf_shape_record_setup.c \
74         swf_shape_record_edge.c swf_gradient.c  swf_gradient_record.c \
75         swf_tag_jpeg.c swf_tag_edit.c swf_tag_action.c swf_tag_lossless.c \
76         swf_tag_sound.c swf_tag_sprite.c swf_tag_shape.c y_keyvalue.c \
77         swf_tag_place.c swf_cxform.c swf_cxformwithalpha.c trans_table.c \
78         swf_tag_button.c swf_button_record.c swf_button_condaction.c \
79         , $ext_shared)
80 fi