~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Brian Aker
  • Date: 2008-06-30 05:41:20 UTC
  • Revision ID: brian@tangent.org-20080630054120-qggcxqh7k7zf09r9
Dead support files, removed gethostbyname_r (we do not use it any longer). 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1476
1476
fi]
1477
1477
)
1478
1478
 
1479
 
# Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments)
1480
 
ac_save_CXXFLAGS="$CXXFLAGS"
1481
 
AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,
1482
 
AC_LANG_SAVE
1483
 
AC_LANG_CPLUSPLUS
1484
 
 
1485
 
# Test whether madvise() is declared in C++ code -- it is not on some
1486
 
# systems, such as Solaris
1487
 
AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H
1488
 
#include <sys/types.h>
1489
 
#include <sys/mman.h>
1490
 
#endif])
1491
 
 
1492
 
# Do not treat warnings as errors if we are linking against other libc
1493
 
# this is to work around gcc not being permissive on non-system includes
1494
 
# with respect to ANSI C++
1495
 
# We also remove the -fbranch-probabilities option as this will give warnings
1496
 
# about not profiled code, which confuses configure
1497
 
# We also must remove -W and -Wcheck which on icc produces warnings that
1498
 
# we don't want to catch with -Werror
1499
 
 
1500
 
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
1501
 
then
1502
 
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
1503
 
fi
1504
 
 
1505
 
AC_TRY_COMPILE(
1506
 
[#undef inline
1507
 
#if !defined(_REENTRANT)
1508
 
#define _REENTRANT
1509
 
#endif
1510
 
#include <pthread.h>
1511
 
#include <sys/types.h>
1512
 
#include <sys/socket.h>
1513
 
#include <netinet/in.h>
1514
 
#include <arpa/inet.h>
1515
 
#include <netdb.h>],
1516
 
[int skr;
1517
 
 struct hostent *foo = gethostbyaddr_r((const char *) 0,
1518
 
  0, 0, (struct hostent *) 0, (char *) NULL,  0, &skr); return (foo == 0);],
1519
 
mysql_cv_gethost_style=solaris, mysql_cv_gethost_style=other))
1520
 
AC_LANG_RESTORE
1521
 
CXXFLAGS="$ac_save_CXXFLAGS"
1522
 
if test "$mysql_cv_gethost_style" = "solaris"
1523
 
then
1524
 
  AC_DEFINE([HAVE_SOLARIS_STYLE_GETHOST], [1],
1525
 
            [Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines this with 8 arguments])
1526
 
fi
1527
 
 
1528
 
#---START: Used in for client configure
1529
 
 
1530
 
# Check definition of gethostbyname_r (glibc2.0.100 is different from Solaris)
1531
 
ac_save_CXXFLAGS="$CXXFLAGS"
1532
 
AC_CACHE_CHECK([style of gethostbyname_r routines], mysql_cv_gethostbyname_style,
1533
 
AC_LANG_SAVE
1534
 
AC_LANG_CPLUSPLUS
1535
 
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
1536
 
then
1537
 
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
1538
 
fi
1539
 
AC_TRY_COMPILE(
1540
 
[#undef inline
1541
 
#if !defined(_REENTRANT)
1542
 
#define _REENTRANT
1543
 
#endif
1544
 
#include <pthread.h>
1545
 
#include <sys/types.h>
1546
 
#include <sys/socket.h>
1547
 
#include <netinet/in.h>
1548
 
#include <arpa/inet.h>
1549
 
#include <netdb.h>],
1550
 
[int skr;
1551
 
 
1552
 
 skr = gethostbyname_r((const char *) 0,
1553
 
  (struct hostent*) 0, (char*) 0, 0, (struct hostent **) 0, &skr);],
1554
 
mysql_cv_gethostbyname_style=glibc2, mysql_cv_gethostbyname_style=other))
1555
 
AC_LANG_RESTORE
1556
 
CXXFLAGS="$ac_save_CXXFLAGS"
1557
 
if test "$mysql_cv_gethostbyname_style" = "glibc2"
1558
 
then
1559
 
  AC_DEFINE([HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE], [1],
1560
 
            [Solaris define gethostbyname_r with 5 arguments. glibc2 defines this with 6 arguments])
1561
 
fi
1562
 
 
1563
 
# Check 3rd argument of getthostbyname_r
1564
 
ac_save_CXXFLAGS="$CXXFLAGS"
1565
 
AC_CACHE_CHECK([3 argument to gethostbyname_r routines], mysql_cv_gethostbyname_arg,
1566
 
AC_LANG_SAVE
1567
 
AC_LANG_CPLUSPLUS
1568
 
if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
1569
 
then
1570
 
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
1571
 
fi
1572
 
AC_TRY_COMPILE(
1573
 
[#undef inline
1574
 
#if !defined(_REENTRANT)
1575
 
#define _REENTRANT
1576
 
#endif
1577
 
#include <pthread.h>
1578
 
#include <sys/types.h>
1579
 
#include <sys/socket.h>
1580
 
#include <netinet/in.h>
1581
 
#include <arpa/inet.h>
1582
 
#include <netdb.h>],
1583
 
[int skr;
1584
 
 
1585
 
 skr = gethostbyname_r((const char *) 0, (struct hostent*) 0, (struct hostent_data*) 0);],
1586
 
mysql_cv_gethostbyname_arg=hostent_data, mysql_cv_gethostbyname_arg=char))
1587
 
AC_LANG_RESTORE
1588
 
CXXFLAGS="$ac_save_CXXFLAGS"
1589
 
if test "$mysql_cv_gethostbyname_arg" = "hostent_data"
1590
 
then
1591
 
  AC_DEFINE([HAVE_GETHOSTBYNAME_R_RETURN_INT], [1],
1592
 
            [In OSF 4.0f the 3'd argument to gethostbyname_r is hostent_data *])
1593
 
fi
1594
 
 
1595
 
 
1596
1479
# Check definition of pthread_getspecific
1597
1480
AC_CACHE_CHECK("args to pthread_getspecific", mysql_cv_getspecific_args,
1598
1481
AC_TRY_COMPILE(
1848
1731
 sql/sql_builtin.cc sql-common/Makefile dnl
1849
1732
 dbug/Makefile scripts/Makefile include/Makefile dnl
1850
1733
 tests/Makefile support-files/Makefile dnl
1851
 
 support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
1852
1734
 mysql-test/Makefile dnl
1853
1735
 include/mysql_version.h plugin/Makefile)
1854
1736