~ubuntu-branches/debian/squeeze/glib2.0/squeeze

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-02-15 13:00:43 UTC
  • mfrom: (1.3.1 upstream) (69.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20090215130043-q47fbt3owmt42m2f
Tags: 2.18.4-2
* Release to unstable
* debian/rules:
- bump SHVER, since we are already forcing a 2.18.0 dependecy on the
  symbols introduced in the development versions
* debian/control.in:
- added Homepage and Vcs-* control fields

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# set glib_binary_age _and_ glib_interface_age to 0.
23
23
#
24
24
m4_define([glib_major_version], [2])
25
 
m4_define([glib_minor_version], [16])
26
 
m4_define([glib_micro_version], [3])
27
 
m4_define([glib_interface_age], [3])
 
25
m4_define([glib_minor_version], [18])
 
26
m4_define([glib_micro_version], [4])
 
27
m4_define([glib_interface_age], [4])
28
28
m4_define([glib_binary_age],
29
29
          [m4_eval(100 * glib_minor_version + glib_micro_version)])
30
30
m4_define([glib_version],
115
115
dnl
116
116
 
117
117
AC_MSG_CHECKING([for Win32])
 
118
LIB_EXE_MACHINE_FLAG=X86
118
119
case "$host" in
119
120
  *-*-mingw*)
120
121
    glib_native_win32=yes
121
 
    GLIB_DEF=glib.def
122
 
    GMODULE_DEF=gmodule.def
123
 
    GOBJECT_DEF=gobject.def
124
 
    GTHREAD_DEF=gthread.def
125
 
    TESTGMODULE_EXP=testgmodule.exp
126
122
    glib_pid_type='void *'
 
123
    glib_cv_stack_grows=no
127
124
    # Unfortunately the mingw implementations of C99-style snprintf and vsnprintf
128
125
    # don't seem to be quite good enough, at least not in mingw-runtime-3.14.
129
126
    # (Sorry, I don't know exactly what is the problem, but it is related to
133
130
    # So preset the autoconf cache variables.
134
131
    ac_cv_func_vsnprintf_c99=no
135
132
    ac_cv_func_snprintf_c99=no
 
133
    case "$host" in
 
134
    x86_64-*-*)
 
135
      LIB_EXE_MACHINE_FLAG=X64
 
136
      ;;
 
137
    esac
136
138
    ;;
137
139
  *)
138
140
    glib_native_win32=no
139
 
    GLIB_DEF=
140
 
    GMODULE_DEF=
141
 
    GOBJECT_DEF=
142
 
    GTHREAD_DEF=
143
 
    TESTGMODULE_EXP=
144
141
    glib_pid_type=int
145
142
    ;;
146
143
esac
152
149
 
153
150
AC_MSG_RESULT([$glib_native_win32])
154
151
 
 
152
AC_SUBST(LIB_EXE_MACHINE_FLAG)
 
153
 
155
154
glib_have_carbon=no
156
155
AC_MSG_CHECKING([for Mac OS X Carbon support])
157
156
AC_TRY_CPP([
162
161
AC_MSG_RESULT([$glib_have_carbon])
163
162
 
164
163
AM_CONDITIONAL(OS_WIN32, [test "$glib_native_win32" = "yes"])
 
164
AM_CONDITIONAL(OS_WIN32_X64, [test "$LIB_EXE_MACHINE_FLAG" = "X64"])
165
165
AM_CONDITIONAL(OS_UNIX, [test "$glib_native_win32" != "yes"])
166
166
AM_CONDITIONAL(OS_LINUX, [test "$glib_os_linux" = "yes"])
167
167
AM_CONDITIONAL(OS_CARBON, [test "$glib_have_carbon" = "yes"])
168
 
AC_SUBST(GLIB_DEF)
169
 
AC_SUBST(GMODULE_DEF)
170
 
AC_SUBST(GOBJECT_DEF)
171
 
AC_SUBST(GTHREAD_DEF)
172
 
AC_SUBST(TESTGMODULE_EXP)
173
168
 
174
169
if test "$glib_native_win32" = "yes"; then
175
170
  AC_CHECK_TOOL(WINDRES, windres, no)
336
331
    fi
337
332
  fi
338
333
fi
 
334
GLIB_EXTRA_CFLAGS="${msnative_struct}"
 
335
AC_SUBST(GLIB_EXTRA_CFLAGS)
339
336
 
340
337
AC_EXEEXT
341
338
 
414
411
  fi
415
412
fi
416
413
 
417
 
jm_GLIBC21
 
414
gl_GLIBC21
418
415
AC_ARG_ENABLE(iconv-cache, 
419
416
              [AC_HELP_STRING([--enable-iconv-cache=@<:@yes/no/auto@:>@],
420
417
                              [cache iconv descriptors [default=auto]])],,
446
443
dnl gettext support
447
444
dnl
448
445
 
449
 
ALL_LINGUAS="am ar as az be be@latin bg bn bn_IN bs ca cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy id is it ja ka kn ko ku lt lv mg mk ml mn mr ms nb ne nl nn oc or pa pl pt pt_BR ro ru rw si sk sl sq sr sr@Latn sr@ije sv ta te th tl tr tt uk vi wa xh yi zh_CN zh_HK zh_TW"
 
446
ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
 
447
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
450
448
GLIB_GNU_GETTEXT
451
449
 
452
450
if test "$gt_cv_have_gettext" != "yes" ; then
492
490
AM_DISABLE_STATIC
493
491
AC_LIBTOOL_WIN32_DLL
494
492
AM_PROG_LIBTOOL
 
493
dnl when using libtool 2.x create libtool early, because it's used in configure
 
494
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
495
495
 
496
496
if test "x$GCC" = "xyes"; then
497
497
  case " $CFLAGS " in
500
500
  esac
501
501
fi
502
502
 
 
503
CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES"
 
504
 
503
505
if test "$glib_native_win32" = "yes"; then
504
506
  if test x$enable_static = xyes -a x$enable_shared = xyes; then
505
507
    AC_MSG_ERROR([Can not build both shared and static at the same time on Windows.])
506
508
  fi
507
509
  if test x$enable_static = xyes; then
508
510
    glib_win32_static_compilation=yes
509
 
    GLIB_WIN32_STATIC_COMPILATION_DEFINE="#define GLIB_STATIC_COMPILATION 1"
 
511
    GLIB_WIN32_STATIC_COMPILATION_DEFINE="#define GLIB_STATIC_COMPILATION 1
 
512
#define GOBJECT_STATIC_COMPILATION 1"
510
513
    AC_SUBST(GLIB_WIN32_STATIC_COMPILATION_DEFINE)
511
514
  fi
512
515
fi
 
516
AM_CONDITIONAL(OS_WIN32_AND_DLL_COMPILATION, [test x$glib_native_win32 = xyes -a x$glib_win32_static_compilation != xyes])
513
517
 
514
518
dnl
515
519
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
552
556
 
553
557
# Checks for library functions.
554
558
AC_FUNC_VPRINTF
555
 
AC_FUNC_MMAP
556
559
AC_FUNC_ALLOCA
 
560
AC_CHECK_FUNCS(mmap)
557
561
AC_CHECK_FUNCS(posix_memalign)
558
562
AC_CHECK_FUNCS(memalign)
559
563
AC_CHECK_FUNCS(valloc)
737
741
AC_MSG_RESULT($g_can_inline)
738
742
 
739
743
dnl *** check for working do while(0) macros ***
740
 
AC_CACHE_CHECK([for working do while(0) macros], g_support_dowhile_macros, [
 
744
AC_CACHE_CHECK([for working do while(0) macros], g_cv_support_dowhile_macros, [
741
745
        AC_TRY_COMPILE([],[
742
746
        #define STMT_START do
743
747
        #define STMT_END while(0)
744
748
        #define STMT_TEST STMT_START { i = 0; } STMT_END
745
749
        int main(void) { int i = 1; STMT_TEST; return i; }],
746
 
        [g_support_dowhile_macros=yes],
747
 
        [g_support_dowhile_macros=no],
748
 
        [g_support_dowhile_macros=yes])
 
750
        [g_cv_support_dowhile_macros=yes],
 
751
        [g_cv_support_dowhile_macros=no],
 
752
        [g_cv_support_dowhile_macros=yes])
749
753
])
750
 
if test x$g_support_dowhile_macros = xyes; then
 
754
if test x$g_cv_support_dowhile_macros = xyes; then
751
755
  AC_DEFINE(HAVE_DOWHILE_MACROS, 1, [define for working do while(0) macros])
752
756
fi
753
757
 
829
833
 
830
834
# check for bytesex stuff
831
835
AC_C_BIGENDIAN
 
836
if test x$ac_cv_c_bigendian = xuniversal ; then
 
837
AC_TRY_COMPILE([#include <endian.h>], [#if __BYTE_ORDER == __BIG_ENDIAN
 
838
#else
 
839
#error Not a big endian. 
 
840
#endif],
 
841
    ac_cv_c_bigendian=yes
 
842
    ,AC_TRY_COMPILE([#include <endian.h>], [#if __BYTE_ORDER == __LITTLE_ENDIAN
 
843
#else
 
844
#error Not a little endian. 
 
845
#endif],
 
846
    ac_cv_c_bigendian=no
 
847
    ,AC_MSG_WARN([Could not determine endianness.])))
 
848
fi
 
849
 
832
850
 
833
851
# check for header files
834
852
AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h grp.h sys/param.h sys/poll.h sys/resource.h])
839
857
 
840
858
# check for structure fields
841
859
AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec])
842
 
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f_fstypename],,, [#include <sys/types.h>
 
860
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f_fstypename, struct statfs.f_bavail],,, [#include <sys/types.h>
843
861
#include <sys/stat.h>
844
862
#include <unistd.h>
 
863
#ifdef HAVE_SYS_STATFS_H
 
864
#include <sys/statfs.h>
 
865
#endif
845
866
#ifdef HAVE_SYS_PARAM_H
846
867
#include <sys/param.h>
847
868
#endif
848
869
#ifdef HAVE_SYS_MOUNT_H
849
870
#include <sys/mount.h>
850
871
#endif])
 
872
# struct statvfs.f_basetype is available on Solaris but not for Linux. 
 
873
AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [#include <sys/statvfs.h>])
851
874
 
852
875
# Checks for libcharset
853
 
jm_LANGINFO_CODESET
854
 
jm_GLIBC21
 
876
AM_LANGINFO_CODESET
 
877
gl_GLIBC21
855
878
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
856
879
AC_CHECK_FUNCS(setlocale)
857
880
 
871
894
  $ac_cv_sizeof_long) 
872
895
      glib_size_type=long
873
896
      ;;
 
897
  $ac_cv_sizeof_long_long)
 
898
      glib_size_type='long long'
 
899
      ;;
 
900
  $ac_cv_sizeof__int64)
 
901
      glib_size_type='__int64'
 
902
      ;;
874
903
  *)  AC_MSG_ERROR([No type matching size_t in size])
875
904
      ;;
876
905
esac
1409
1438
        G_MODULE_SUPPORTED=true
1410
1439
fi
1411
1440
 
1412
 
AC_MSG_CHECKING(for the suffix of shared libraries)
 
1441
AC_MSG_CHECKING(for the suffix of module shared libraries)
1413
1442
export SED
1414
1443
shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
1415
1444
eval $shrext_cmds
1487
1516
 
1488
1517
 AC_CHECK_LIB(selinux, is_selinux_enabled,
1489
1518
   [AC_CHECK_HEADERS(selinux/selinux.h,
1490
 
     [AC_SEARCH_LIBS(lgetfilecon_raw, selinux, 
 
1519
     [AC_CHECK_LIB(selinux, lgetfilecon_raw, 
1491
1520
       [AC_DEFINE(HAVE_SELINUX, 1, [Define to 1 if libselinux is available])
1492
1521
        SELINUX_LIBS="-lselinux"
1493
1522
        msg_selinux=yes])
1507
1536
 
1508
1537
AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
1509
1538
 
 
1539
dnl *********************************
 
1540
dnl ** Check for Solaris FEN (GIO) **
 
1541
dnl *********************************
 
1542
fen_support=no
 
1543
AC_COMPILE_IFELSE([ 
 
1544
#include <port.h> 
 
1545
#ifndef PORT_SOURCE_FILE 
 
1546
#error "Please upgrade to Nevada 72 or above to suppoert FEN" 
 
1547
#endif 
 
1548
int main() { return 0; } ],
 
1549
[
 
1550
        fen_support=yes
 
1551
],)
 
1552
 
 
1553
AM_CONDITIONAL(HAVE_FEN, [test "$fen_support" = "yes"])
 
1554
 
1510
1555
dnl ****************************
1511
1556
dnl *** Checks for FAM (GIO) ***
1512
1557
dnl ****************************
2362
2407
      glib_memory_barrier_needed=yes
2363
2408
      ;;
2364
2409
  esac
 
2410
else
 
2411
  if test $glib_native_win32 = yes; then
 
2412
    # For Windows but not using gcc. No barriers needed then either.
 
2413
    glib_memory_barrier_needed=no
 
2414
  fi
2365
2415
fi
2366
2416
 
2367
2417
dnl ****************************************
2602
2652
        if test x$glib_sys_poll_h = xyes; then
2603
2653
          echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
2604
2654
        fi
 
2655
        if test x$glib_included_printf != xyes; then
 
2656
          echo "
 
2657
/* Specifies that GLib's g_print*() functions wrap the
 
2658
 * system printf functions.  This is useful to know, for example,
 
2659
 * when using glibc's register_printf_function().
 
2660
 */" >> $outfile
 
2661
          echo '#define GLIB_USING_SYSTEM_PRINTF' >> $outfile
 
2662
        fi
2605
2663
 
2606
2664
        cat >> $outfile <<_______EOF
2607
2665
 
2709
2767
 
2710
2768
#define GINT_TO_POINTER(i)      ((gpointer) ${glib_gpi_cast} (i))
2711
2769
#define GUINT_TO_POINTER(u)     ((gpointer) ${glib_gpui_cast} (u))
 
2770
 
 
2771
typedef signed $glib_intptr_type_define gintptr;
 
2772
typedef unsigned $glib_intptr_type_define guintptr;
2712
2773
_______EOF
2713
2774
        else
2714
2775
          echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
2802
2863
_______EOF
2803
2864
        fi
2804
2865
                cat >>$outfile <<_______EOF
2805
 
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
 
2866
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
 
2867
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
 
2868
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
2806
2869
#define G_GNUC_INTERNAL __hidden
2807
2870
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
2808
2871
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
2809
2872
#else
2810
2873
#define G_GNUC_INTERNAL
2811
 
#endif
 
2874
#endif 
2812
2875
_______EOF
2813
2876
 
2814
2877
 
2829
2892
  } static_mutex;
2830
2893
};
2831
2894
#define G_STATIC_MUTEX_INIT     { NULL, { { $g_mutex_contents} } }
2832
 
#ifdef __cplusplus
2833
2895
#define g_static_mutex_get_mutex(mutex) \\
2834
2896
  (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
2835
2897
   g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
2836
 
#else
2837
 
#define g_static_mutex_get_mutex(mutex) \\
2838
 
  (g_thread_use_default_impl ? ((GMutex*) (void*) ((mutex)->static_mutex.pad)) : \\
2839
 
   g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
2840
 
#endif
2841
2898
_______EOF
2842
2899
        else
2843
2900
                cat >>$outfile <<_______EOF
2900
2957
 
2901
2958
#define G_MODULE_SUFFIX "$g_module_suffix"
2902
2959
 
 
2960
/* A GPid is an abstraction for a process "handle". It is *not* an
 
2961
 * abstraction for a process identifier in general. GPid is used in
 
2962
 * GLib only for descendant processes spawned with the g_spawn*
 
2963
 * functions. On POSIX there is no "process handle" concept as such,
 
2964
 * but on Windows a GPid is a handle to a process, a kind of pointer,
 
2965
 * not a process identifier.
 
2966
 */
2903
2967
typedef $g_pid_type GPid;
2904
2968
 
2905
2969
G_END_DECLS
2959
3023
  glib_sys_poll_h=yes
2960
3024
fi
2961
3025
 
 
3026
if test x$enable_included_printf = xyes ; then
 
3027
  glib_included_printf=yes
 
3028
fi
 
3029
 
2962
3030
case 2 in
2963
3031
$ac_cv_sizeof_short)            
2964
3032
  gint16=short
3036
3104
  ;;
3037
3105
esac
3038
3106
glib_size_t=$ac_cv_sizeof_size_t
3039
 
glib_size_type_define=$glib_size_type
3040
 
glib_void_p=$ac_cv_sizeof_long
3041
 
glib_long=$ac_cv_sizeof_void_p
 
3107
glib_size_type_define="$glib_size_type"
 
3108
glib_void_p=$ac_cv_sizeof_void_p
 
3109
glib_long=$ac_cv_sizeof_long
3042
3110
 
3043
 
case $glib_size_type in
 
3111
case "$glib_size_type" in
3044
3112
short)
3045
3113
  gsize_modifier='"h"'
3046
3114
  gsize_format='"hu"'
3059
3127
  gssize_format='"li"'
3060
3128
  glib_msize_type='LONG'
3061
3129
  ;;
 
3130
"long long"|__int64)
 
3131
  gsize_modifier='"I64"'
 
3132
  gsize_format='"I64u"'
 
3133
  gssize_format='"I64i"'
 
3134
  glib_msize_type='INT64'
 
3135
  ;;
3062
3136
esac
3063
3137
 
3064
3138
gintbits=`expr $ac_cv_sizeof_int \* 8`
3065
3139
glongbits=`expr $ac_cv_sizeof_long \* 8`
3066
3140
 
3067
 
 
3068
3141
case $ac_cv_sizeof_void_p in
3069
 
$ac_cv_sizeof_int)      glib_gpi_cast=''        glib_gpui_cast=''         ;;
3070
 
$ac_cv_sizeof_long)     glib_gpi_cast='(glong)' glib_gpui_cast='(gulong)' ;;
3071
 
*)                      glib_unknown_void_p=yes ;;
 
3142
$ac_cv_sizeof_int)
 
3143
  glib_intptr_type_define=int
 
3144
  glib_gpi_cast=''
 
3145
  glib_gpui_cast=''
 
3146
  ;;
 
3147
$ac_cv_sizeof_long)
 
3148
  glib_intptr_type_define=long
 
3149
  glib_gpi_cast='(glong)'
 
3150
  glib_gpui_cast='(gulong)'
 
3151
  ;;
 
3152
$ac_cv_sizeof_long_long)
 
3153
  glib_intptr_type_define='long long'
 
3154
  glib_gpi_cast='(gint64)'
 
3155
  glib_gpui_cast='(guint64)'
 
3156
  ;;
 
3157
$ac_cv_sizeof___int64)
 
3158
  glib_intptr_type_define=__int64
 
3159
  glib_gpi_cast='(gint64)'
 
3160
  glib_gpui_cast='(guint64)'
 
3161
  ;;
 
3162
*)
 
3163
  glib_unknown_void_p=yes
 
3164
  ;;
3072
3165
esac
3073
3166
 
3074
3167
 
3142
3235
g_have_gnuc_visibility=$g_have_gnuc_visibility
3143
3236
g_have_sunstudio_visibility=$g_have_sunstudio_visibility
3144
3237
 
3145
 
case xyes in
3146
 
x$ac_cv_c_bigendian)
 
3238
if test x$ac_cv_c_bigendian = xyes; then
3147
3239
  g_byte_order=G_BIG_ENDIAN
3148
3240
  g_bs_native=BE
3149
3241
  g_bs_alien=LE
3150
 
  ;;
3151
 
*)
 
3242
else
3152
3243
  g_byte_order=G_LITTLE_ENDIAN
3153
3244
  g_bs_native=LE
3154
3245
  g_bs_alien=BE
3155
 
  ;;
3156
 
esac
 
3246
fi
3157
3247
 
3158
3248
g_pollin=$glib_cv_value_POLLIN
3159
3249
g_pollout=$glib_cv_value_POLLOUT
3202
3292
esac
3203
3293
glib_static_compilation=""
3204
3294
if test x$glib_win32_static_compilation = xyes; then
3205
 
  glib_static_compilation="#define GLIB_STATIC_COMPILATION 1"
 
3295
  glib_static_compilation="#define GLIB_STATIC_COMPILATION 1
 
3296
#define GOBJECT_STATIC_COMPILATION 1"
3206
3297
fi
3207
3298
])
3208
3299
 
3244
3335
gio/Makefile
3245
3336
gio/xdgmime/Makefile
3246
3337
gio/inotify/Makefile
 
3338
gio/fen/Makefile
3247
3339
gio/fam/Makefile
 
3340
gio/win32/Makefile
3248
3341
gio/tests/Makefile
3249
3342
po/Makefile.in
3250
3343
docs/Makefile