~ubuntu-branches/ubuntu/edgy/knetfilter/edgy

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Angel Ramos
  • Date: 2006-01-09 19:53:06 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20060109195306-f7qvfnft5j4vv8dh
Tags: 3.5.0-1
* New upstream release (Closes: #327969).
* Removed xlibs-dev as build-depends (Closes: #347007).

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
dnl    You should have received a copy of the GNU Library General Public License
18
18
dnl    along with this library; see the file COPYING.LIB.  If not, write to
19
 
dnl    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
dnl    Boston, MA 02111-1307, USA.
 
19
dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
20
dnl    Boston, MA 02110-1301, USA.
21
21
 
22
22
dnl IMPORTANT NOTE:
23
23
dnl Please do not modify this file unless you expect your modifications to be
96
96
  # Don't add to $LIBS permanently.
97
97
  ac_save_LIBS="$LIBS"
98
98
  LIBS="-l$x_direct_test_library $LIBS"
99
 
AC_TRY_LINK(, [${x_direct_test_function}()],
 
99
AC_TRY_LINK([#include <X11/Intrinsic.h>], [${x_direct_test_function}(1)],
100
100
[LIBS="$ac_save_LIBS"
101
101
# We can link X programs with no special library path.
102
102
ac_x_libraries=],
173
173
done
174
174
])
175
175
 
176
 
dnl KDE_FIND_PATH(programm-name, variable-name, list of directories,
177
 
dnl     if-not-found, test-parameter)
 
176
dnl KDE_FIND_PATH(program-name, variable-name, list-of-dirs,
 
177
dnl     if-not-found, test-parameter, prepend-path)
 
178
dnl
 
179
dnl Look for program-name in list-of-dirs+$PATH.
 
180
dnl If prepend-path is set, look in $PATH+list-of-dirs instead.
 
181
dnl If found, $variable-name is set. If not, if-not-found is evaluated.
 
182
dnl test-parameter: if set, the program is executed with this arg,
 
183
dnl                 and only a successful exit code is required.
178
184
AC_DEFUN([KDE_FIND_PATH],
179
185
[
180
186
   AC_MSG_CHECKING([for $1])
186
192
        AC_CACHE_VAL(kde_cv_path_$kde_cache,
187
193
        [
188
194
        kde_cv_path="NONE"
189
 
        dirs="$3"
190
195
        kde_save_IFS=$IFS
191
196
        IFS=':'
 
197
        dirs=""
192
198
        for dir in $PATH; do
193
199
          dirs="$dirs $dir"
194
 
        done
 
200
        done
 
201
        if test -z "$6"; then  dnl Append dirs in PATH (default)
 
202
          dirs="$3 $dirs"
 
203
        else  dnl Prepend dirs in PATH (if 6th arg is set)
 
204
          dirs="$dirs $3"
 
205
        fi
195
206
        IFS=$kde_save_IFS
196
207
 
197
208
        for dir in $dirs; do
533
544
])
534
545
])
535
546
 
 
547
AC_DEFUN([KDE_SET_DEFAULT_BINDIRS],
 
548
[
 
549
    kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
 
550
    test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
 
551
    if test -n "$KDEDIRS"; then
 
552
       kde_save_IFS=$IFS
 
553
       IFS=:
 
554
       for dir in $KDEDIRS; do
 
555
            kde_default_bindirs="$dir/bin $kde_default_bindirs "
 
556
       done
 
557
       IFS=$kde_save_IFS
 
558
    fi
 
559
])
 
560
 
536
561
AC_DEFUN([KDE_SUBST_PROGRAMS],
537
562
[
538
563
    AC_ARG_WITH(arts,
539
 
        AC_HELP_STRING([--without-arts],[build without aRts [default=yes]]),
 
564
        AC_HELP_STRING([--without-arts],[build without aRts [default=no]]),
540
565
        [build_arts=$withval],
541
566
        [build_arts=yes]
542
567
    )
543
 
    AM_CONDITIONAL(include_ARTS, test "$build_arts" != "no")
 
568
    AM_CONDITIONAL(include_ARTS, test "$build_arts" '!=' "no")
 
569
    if test "$build_arts" = "no"; then
 
570
        AC_DEFINE(WITHOUT_ARTS, 1, [Defined if compiling without arts])
 
571
    fi
544
572
 
545
 
        kde_default_bindirs="/usr/bin /usr/local/bin /opt/local/bin /usr/X11R6/bin /opt/kde/bin /opt/kde3/bin /usr/kde/bin /usr/local/kde/bin"
546
 
        test -n "$KDEDIR" && kde_default_bindirs="$KDEDIR/bin $kde_default_bindirs"
547
 
        if test -n "$KDEDIRS"; then
548
 
           kde_save_IFS=$IFS
549
 
           IFS=:
550
 
           for dir in $KDEDIRS; do
551
 
                kde_default_bindirs="$dir/bin $kde_default_bindirs "
552
 
           done
553
 
           IFS=$kde_save_IFS
554
 
        fi
555
 
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_default_bindirs"
 
573
        KDE_SET_DEFAULT_BINDIRS
 
574
        kde_default_bindirs="$exec_prefix/bin $prefix/bin $kde_libs_prefix/bin $kde_default_bindirs"
556
575
        KDE_FIND_PATH(dcopidl, DCOPIDL, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl)])
557
576
        KDE_FIND_PATH(dcopidl2cpp, DCOPIDL2CPP, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidl2cpp)])
558
 
        if test "$build_arts" != "no"; then
 
577
        if test "$build_arts" '!=' "no"; then
559
578
          KDE_FIND_PATH(mcopidl, MCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
560
579
          KDE_FIND_PATH(artsc-config, ARTSCCONFIG, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(artsc-config)])
561
580
        fi
562
 
        KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs])
563
581
        KDE_FIND_PATH(meinproc, MEINPROC, [$kde_default_bindirs])
564
582
 
565
583
        kde32ornewer=1
 
584
        kde33ornewer=1
566
585
        if test -n "$kde_qtver" && test "$kde_qtver" -lt 3; then
567
586
            kde32ornewer=
 
587
            kde33ornewer=
568
588
        else
569
 
            if test "$kde_qtver" = "3" && test "$kde_qtsubver" -le 1; then
 
589
            if test "$kde_qtver" = "3"; then
 
590
              if test "$kde_qtsubver" -le 1; then
570
591
                kde32ornewer=
 
592
              fi
 
593
              if test "$kde_qtsubver" -le 2; then
 
594
                kde33ornewer=
 
595
              fi
 
596
              if test "$KDECONFIG" != "compiled"; then
 
597
                if test `$KDECONFIG --version | grep KDE | sed 's/KDE: \(...\).*/\1/'` = 3.2; then
 
598
                  kde33ornewer=
 
599
                fi
 
600
              fi
571
601
            fi
572
602
        fi
573
603
 
575
605
            KDE_FIND_PATH(kconfig_compiler, KCONFIG_COMPILER, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kconfig_compiler)])
576
606
            KDE_FIND_PATH(dcopidlng, DCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
577
607
        fi
578
 
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [XMLLINT=""])
 
608
        if test -n "$kde33ornewer"; then
 
609
            KDE_FIND_PATH(makekdewidgets, MAKEKDEWIDGETS, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(makekdewidgets)])
 
610
            AC_SUBST(MAKEKDEWIDGETS)
 
611
        fi
 
612
        KDE_FIND_PATH(xmllint, XMLLINT, [${prefix}/bin ${exec_prefix}/bin], [XMLLINT=""])
579
613
 
580
 
        if test -n "$MEINPROC" && test ! "$MEINPROC" = "compiled"; then  
 
614
        if test -n "$MEINPROC" -a "$MEINPROC" != "compiled"; then
581
615
            kde_sharedirs="/usr/share/kde /usr/local/share /usr/share /opt/kde3/share /opt/kde/share $prefix/share"
582
616
            test -n "$KDEDIR" && kde_sharedirs="$KDEDIR/share $kde_sharedirs"
583
617
            AC_FIND_FILE(apps/ksgmltools2/customization/kde-chunk.xsl, $kde_sharedirs, KDE_XSL_STYLESHEET)
601
635
        AC_SUBST(DCOP_DEPENDENCIES)
602
636
        AC_SUBST(MCOPIDL)
603
637
        AC_SUBST(ARTSCCONFIG)
604
 
        AC_SUBST(KDECONFIG)
605
638
        AC_SUBST(MEINPROC)
606
639
        AC_SUBST(KDE_XSL_STYLESHEET)
607
640
        AC_SUBST(XMLLINT)
608
 
 
609
 
        if test -x "$KDECONFIG"; then # it can be "compiled"
610
 
          kde_libs_prefix=`$KDECONFIG --prefix`
611
 
          if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
612
 
               AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
613
 
                          This means it has been moved since you installed it.
614
 
                          This won't work. Please recompile kdelibs for the new prefix.
615
 
                          ])
616
 
           fi
617
 
           kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
618
 
        else
619
 
           kde_libs_prefix='$(prefix)'
620
 
           kde_libs_htmldir='$(kde_htmldir)'
621
 
        fi
622
 
        AC_SUBST(kde_libs_prefix)
623
 
        AC_SUBST(kde_libs_htmldir)
624
641
])dnl
625
642
 
626
643
AC_DEFUN([AC_CREATE_KFSSTND],
755
772
   # more headers that need to be explicitly included on darwin
756
773
   AC_CHECK_HEADERS(sys/types.h stdint.h)
757
774
 
 
775
   # sys/bitypes.h is needed for uint32_t and friends on Tru64
 
776
   AC_CHECK_HEADERS(sys/bitypes.h)
 
777
 
758
778
   # darwin requires a poll emulation library
759
779
   AC_CHECK_LIB(poll, poll, LIB_POLL="-lpoll")
760
780
 
 
781
   # for some image handling on Mac OS X
 
782
   AC_CHECK_HEADERS(Carbon/Carbon.h)
 
783
 
761
784
   # CoreAudio framework
762
785
   AC_CHECK_HEADER(CoreAudio/CoreAudio.h, [
763
786
     AC_DEFINE(HAVE_COREAUDIO, 1, [Define if you have the CoreAudio API])
785
808
   KDE_CHECK_TYPES
786
809
   KDE_CHECK_LIBDL
787
810
   KDE_CHECK_STRLCPY
 
811
   KDE_CHECK_PIE_SUPPORT
788
812
 
789
813
# darwin needs this to initialize the environment
790
814
AC_CHECK_HEADERS(crt_externs.h)
869
893
  kde_use_qt_mac=no
870
894
)
871
895
 
 
896
# used to disable x11-specific stuff on special platforms
 
897
AM_CONDITIONAL(include_x11, test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no")
 
898
 
872
899
if test "$kde_use_qt_emb" = "no" && test "$kde_use_qt_mac" = "no"; then
873
900
 
874
901
AC_MSG_CHECKING(for X)
964
991
  X_LDFLAGS="-L$x_libraries"
965
992
fi
966
993
all_includes="$X_INCLUDES"
967
 
all_libraries="$X_LDFLAGS"
 
994
all_libraries="$X_LDFLAGS $LDFLAGS_AS_NEEDED $LDFLAGS_NEW_DTAGS"
968
995
 
969
996
# Check for libraries that X11R6 Xt/Xaw programs need.
970
997
ac_save_LDFLAGS="$LDFLAGS"
1126
1153
AC_DEFUN([KDE_USE_QT],
1127
1154
[
1128
1155
if test -z "$1"; then
1129
 
  # Current default Qt version: 3.2
 
1156
  # Current default Qt version: 3.3
1130
1157
  kde_qtver=3
1131
 
  kde_qtsubver=2
 
1158
  kde_qtsubver=3
1132
1159
else
1133
1160
  kde_qtsubver=`echo "$1" | sed -e 's#[0-9][0-9]*\.\([0-9][0-9]*\).*#\1#'`
1134
1161
  # following is the check if subversion isnt found in passed argument
1152
1179
  if test "$kde_qtver" = "3"; then
1153
1180
    if test $kde_qtsubver -gt 0; then
1154
1181
         if test $kde_qtsubver -gt 1; then
1155
 
            kde_qt_minversion=">= Qt 3.2"
 
1182
            if test $kde_qtsubver -gt 2; then
 
1183
                kde_qt_minversion=">= Qt 3.3 and < 4.0"
 
1184
            else
 
1185
                kde_qt_minversion=">= Qt 3.2 and < 4.0"
 
1186
            fi
1156
1187
         else
1157
 
            kde_qt_minversion=">= Qt 3.1 (20021021)"
 
1188
            kde_qt_minversion=">= Qt 3.1 (20021021) and < 4.0"
1158
1189
         fi
1159
1190
    else
1160
 
      kde_qt_minversion=">= Qt 3.0"
 
1191
      kde_qt_minversion=">= Qt 3.0 and < 4.0"
1161
1192
    fi
1162
1193
  fi
1163
1194
  if test "$kde_qtver" = "1"; then
1170
1201
if test -z "$3"; then
1171
1202
   if test $kde_qtver = 3; then
1172
1203
     if test $kde_qtsubver -gt 0; then
1173
 
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
 
1204
       kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000"
1174
1205
       qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1175
1206
       kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1176
1207
     else
1177
 
       kde_qt_verstring="QT_VERSION >= 300"
 
1208
       kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000"
1178
1209
     fi
1179
1210
   fi
1180
1211
   if test $kde_qtver = 2; then
1191
1222
   kde_qt_verstring="$3"
1192
1223
fi
1193
1224
 
 
1225
if test $kde_qtver = 4; then
 
1226
  kde_qt_dirs="$QTDIR /usr/lib/qt4 /usr/lib/qt /usr/share/qt4"
 
1227
fi
1194
1228
if test $kde_qtver = 3; then
1195
1229
  kde_qt_dirs="$QTDIR /usr/lib/qt3 /usr/lib/qt /usr/share/qt3"
1196
1230
fi
1322
1356
  fi
1323
1357
fi
1324
1358
 
1325
 
if test -z "$LIBQT"; then
1326
1359
dnl ------------------------------------------------------------
1327
1360
dnl If we got --enable-embedded then adjust the Qt library name.
1328
1361
dnl ------------------------------------------------------------
1329
 
  if test "x$kde_use_qt_emb" = "xyes"; then
1330
 
    qtlib="qte"
1331
 
  else
1332
 
    qtlib="qt"
1333
 
  fi
1334
 
 
1335
 
  kde_int_qt="-l$qtlib"
 
1362
if test "x$kde_use_qt_emb" = "xyes"; then
 
1363
  qtlib="qte"
1336
1364
else
1337
 
  kde_int_qt="$LIBQT"
1338
 
  kde_lib_qt_set=yes
 
1365
  qtlib="qt"
1339
1366
fi
1340
1367
 
 
1368
kde_int_qt="-l$qtlib"
 
1369
 
1341
1370
if test -z "$LIBQPE"; then
1342
1371
dnl ------------------------------------------------------------
1343
1372
dnl If we got --enable-palmtop then add -lqpe to the link line
1358
1387
dnl ------------------------------------------------------------------------
1359
1388
 
1360
1389
if test "x$kde_use_qt_mt" = "xyes"; then
1361
 
  if test -z "$LIBQT"; then
1362
 
    LIBQT="-l$qtlib-mt"
1363
 
    kde_int_qt="-l$qtlib-mt"
1364
 
  else
1365
 
    LIBQT="$qtlib-mt"
1366
 
    kde_int_qt="$qtlib-mt"
1367
 
  fi
 
1390
  LIBQT="-l$qtlib-mt"
 
1391
  kde_int_qt="-l$qtlib-mt"
1368
1392
  LIBQT_GLOB="lib$qtlib-mt.*"
1369
1393
  USING_QT_MT="using -mt"
1370
1394
else
1542
1566
 QT_LDFLAGS=""
1543
1567
else
1544
1568
 QT_LDFLAGS="-L$qt_libraries"
1545
 
 all_libraries="$all_libraries $QT_LDFLAGS"
 
1569
 all_libraries="$QT_LDFLAGS $all_libraries"
1546
1570
fi
1547
1571
test -z "$KDE_MT_LDFLAGS" || all_libraries="$all_libraries $KDE_MT_LDFLAGS"
1548
1572
 
1619
1643
 
1620
1644
AC_MSG_RESULT([$kde_cv_uic_plugins])
1621
1645
if test "$kde_cv_uic_plugins" != yes; then
1622
 
        AC_MSG_ERROR([you need to install kdelibs first.])
 
1646
        AC_MSG_ERROR([
 
1647
you need to install kdelibs first.
 
1648
 
 
1649
If you did install kdelibs, then the Qt version that is picked up by
 
1650
this configure is not the same version you used to compile kdelibs. 
 
1651
The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the 
 
1652
_same Qt version_, compiled with the _same compiler_ and the same Qt
 
1653
configuration settings.
 
1654
])
1623
1655
fi
1624
1656
fi
1625
1657
])
1672
1704
  AC_SUBST(KDE_NO_UNDEFINED)
1673
1705
])
1674
1706
 
 
1707
dnl Check if the linker supports --enable-new-dtags and --as-needed
 
1708
AC_DEFUN([KDE_CHECK_NEW_LDFLAGS],
 
1709
[
 
1710
  AC_ARG_ENABLE(new_ldflags,
 
1711
                AC_HELP_STRING([--enable-new-ldflags],
 
1712
                [enable the new linker flags]),
 
1713
        kde_use_new_ldflags=$enableval, 
 
1714
        kde_use_new_ldflags=no)
 
1715
 
 
1716
  LDFLAGS_AS_NEEDED=""
 
1717
  LDFLAGS_NEW_DTAGS=""
 
1718
  if test "x$kde_use_new_ldflags" = "xyes"; then
 
1719
       LDFLAGS_NEW_DTAGS=""
 
1720
       KDE_CHECK_COMPILER_FLAG([Wl,--enable-new-dtags],
 
1721
                [LDFLAGS_NEW_DTAGS="-Wl,--enable-new-dtags"],)
 
1722
 
 
1723
       KDE_CHECK_COMPILER_FLAG([Wl,--as-needed],
 
1724
                [LDFLAGS_AS_NEEDED="-Wl,--as-needed"],)
 
1725
  fi
 
1726
  AC_SUBST(LDFLAGS_AS_NEEDED)
 
1727
  AC_SUBST(LDFLAGS_NEW_DTAGS)
 
1728
])
 
1729
 
1675
1730
AC_DEFUN([KDE_CHECK_NMCHECK],
1676
1731
[
1677
1732
  AC_ARG_ENABLE(nmcheck,AC_HELP_STRING([--enable-nmcheck],[enable automatic namespace cleanness check]),
1738
1793
 
1739
1794
if test -z "$1"; then
1740
1795
 
1741
 
kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
 
1796
kde_incdirs="$kde_libs_prefix/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes $qt_includes"
1742
1797
test -n "$KDEDIR" && kde_incdirs="$KDEDIR/include $KDEDIR/include/kde $KDEDIR $kde_incdirs"
1743
1798
kde_incdirs="$ac_kde_includes $kde_incdirs"
1744
1799
AC_FIND_FILE($kde_check_header, $kde_incdirs, kde_incdir)
1750
1805
So, check this please and use another prefix!])
1751
1806
fi
1752
1807
 
1753
 
kde_libdirs="/usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
 
1808
kde_libdirs="$kde_libs_prefix/lib${kdelibsuff} /usr/lib/kde/lib${kdelibsuff} /usr/local/kde/lib${kdelibsuff} /usr/kde/lib${kdelibsuff} /usr/lib${kdelibsuff}/kde /usr/lib${kdelibsuff}/kde3 /usr/lib${kdelibsuff} /usr/X11R6/lib${kdelibsuff} /usr/local/lib${kdelibsuff} /opt/kde3/lib${kdelibsuff} /opt/kde/lib${kdelibsuff} /usr/X11R6/kde/lib${kdelibsuff}"
1754
1809
test -n "$KDEDIR" && kde_libdirs="$KDEDIR/lib${kdelibsuff} $KDEDIR $kde_libdirs"
1755
1810
kde_libdirs="$ac_kde_libraries $libdir $kde_libdirs"
1756
1811
AC_FIND_FILE($kde_check_lib, $kde_libdirs, kde_libdir)
1784
1839
    ac_kde_includes=$ac_kde_includes ac_kde_libraries=$ac_kde_libraries"
1785
1840
fi
1786
1841
 
1787
 
else dnl test -z $1
 
1842
else dnl test -z $1, e.g. from kdelibs
1788
1843
 
1789
1844
  ac_cv_have_kde="have_kde=no"
1790
1845
 
1832
1887
 
1833
1888
KDE_LDFLAGS="-L$kde_libraries"
1834
1889
if test ! "$kde_libraries" = "$x_libraries" && test ! "$kde_libraries" = "$qt_libraries" ; then 
1835
 
 all_libraries="$all_libraries $KDE_LDFLAGS"
 
1890
 all_libraries="$KDE_LDFLAGS $all_libraries"
1836
1891
fi
1837
1892
 
1838
1893
AC_SUBST(KDE_LDFLAGS)
2008
2063
   AC_REQUIRE([K_PATH_X])
2009
2064
 
2010
2065
if test $kde_qtver = 3; then
 
2066
   case $host in 
 
2067
               *cygwin*) lib_kded="-lkdeinit_kded" ;;
 
2068
               *) lib_kded="" ;;
 
2069
       esac
 
2070
   AC_SUBST(LIB_KDED, $lib_kded)
2011
2071
   AC_SUBST(LIB_KDECORE, "-lkdecore")
2012
2072
   AC_SUBST(LIB_KDEUI, "-lkdeui")
2013
2073
   AC_SUBST(LIB_KIO, "-lkio")
 
2074
   AC_SUBST(LIB_KJS, "-lkjs")
2014
2075
   AC_SUBST(LIB_SMB, "-lsmb")
2015
2076
   AC_SUBST(LIB_KAB, "-lkab")
2016
2077
   AC_SUBST(LIB_KABC, "-lkabc")
2020
2081
   AC_SUBST(LIB_KDEPRINT, "-lkdeprint")
2021
2082
   AC_SUBST(LIB_KUTILS, "-lkutils")
2022
2083
   AC_SUBST(LIB_KDEPIM, "-lkdepim")
 
2084
   AC_SUBST(LIB_KIMPROXY, "-lkimproxy")
 
2085
   AC_SUBST(LIB_KNEWSTUFF, "-lknewstuff")
 
2086
   AC_SUBST(LIB_KDNSSD, "-lkdnssd")
 
2087
   AC_SUBST(LIB_KUNITTEST, "-lkunittest")
2023
2088
# these are for backward compatibility
2024
2089
   AC_SUBST(LIB_KSYCOCA, "-lkio")
2025
2090
   AC_SUBST(LIB_KFILE, "-lkio")
2273
2338
        [MKSTEMPS])
2274
2339
])
2275
2340
 
 
2341
AC_DEFUN([AC_CHECK_MKSTEMP],
 
2342
[
 
2343
        KDE_CHECK_FUNC_EXT(mkstemp, [
 
2344
#include <stdlib.h>
 
2345
#include <unistd.h>
 
2346
],
 
2347
        [
 
2348
mkstemp("/tmp/aaaXXXXXX");
 
2349
],
 
2350
        [int mkstemp(char *)],
 
2351
        [MKSTEMP])
 
2352
])
 
2353
 
2276
2354
AC_DEFUN([AC_CHECK_MKDTEMP],
2277
2355
[
2278
2356
        KDE_CHECK_FUNC_EXT(mkdtemp, [
2312
2390
  LIBS=$kde_libs_safe
2313
2391
  AC_SUBST(LIBRESOLV)
2314
2392
 
2315
 
  AC_MSG_CHECKING([if res_init is available])
2316
 
  AC_TRY_COMPILE(
 
2393
  KDE_CHECK_FUNC_EXT(res_init,
2317
2394
    [
2318
2395
#include <sys/types.h>
2319
2396
#include <netinet/in.h>
2320
2397
#include <arpa/nameser.h>
2321
2398
#include <resolv.h>
2322
2399
    ],
2323
 
    [
2324
 
      res_init();
2325
 
    ],
2326
 
    [
2327
 
      AC_MSG_RESULT(yes)
2328
 
      AC_DEFINE(HAVE_RES_INIT, 1, [Define if you have the res_init function])
2329
 
    ],
2330
 
    [ AC_MSG_RESULT(no) ]
2331
 
  )
 
2400
    [res_init()],
 
2401
    [int res_init(void)],
 
2402
    [RES_INIT])
2332
2403
])
2333
2404
 
2334
2405
AC_DEFUN([AC_CHECK_STRLCPY],
2356
2427
        [STRLCAT])
2357
2428
])
2358
2429
 
 
2430
AC_DEFUN([AC_CHECK_RES_QUERY],
 
2431
[
 
2432
        KDE_CHECK_FUNC_EXT(res_query, [
 
2433
#include <sys/types.h>
 
2434
#include <netinet/in.h>
 
2435
#include <arpa/nameser.h>
 
2436
#include <resolv.h>
 
2437
#include <netdb.h>
 
2438
],
 
2439
[
 
2440
res_query(NULL, 0, 0, NULL, 0);
 
2441
],
 
2442
        [int res_query(const char *, int, int, unsigned char *, int)],
 
2443
        [RES_QUERY])
 
2444
])
 
2445
 
 
2446
AC_DEFUN([AC_CHECK_DN_SKIPNAME],
 
2447
[
 
2448
        KDE_CHECK_FUNC_EXT(dn_skipname, [
 
2449
#include <sys/types.h>
 
2450
#include <netinet/in.h>
 
2451
#include <arpa/nameser.h>
 
2452
#include <resolv.h>
 
2453
],
 
2454
[
 
2455
dn_skipname (NULL, NULL);
 
2456
],
 
2457
        [int dn_skipname (unsigned char *, unsigned char *)],
 
2458
        [DN_SKIPNAME])
 
2459
])
 
2460
 
 
2461
 
2359
2462
AC_DEFUN([AC_FIND_GIF],
2360
2463
   [AC_MSG_CHECKING([for giflib])
2361
2464
AC_CACHE_VAL(ac_cv_lib_gif,
2400
2503
ac_save_CFLAGS="$CFLAGS"
2401
2504
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
2402
2505
AC_TRY_LINK(
2403
 
[/* Override any gcc2 internal prototype to avoid an error.  */
2404
 
struct jpeg_decompress_struct;
2405
 
typedef struct jpeg_decompress_struct * j_decompress_ptr;
2406
 
typedef int size_t;
 
2506
[
2407
2507
#ifdef __cplusplus
2408
2508
extern "C" {
2409
2509
#endif
2410
 
    void jpeg_CreateDecompress(j_decompress_ptr cinfo,
2411
 
                                    int version, size_t structsize);
 
2510
void jpeg_CreateDecompress();
2412
2511
#ifdef __cplusplus
2413
2512
}
2414
2513
#endif
2415
 
/* We use char because int might match the return type of a gcc2
2416
 
    builtin and then its argument prototype would still apply.  */
2417
2514
],
2418
 
            [jpeg_CreateDecompress(0L, 0, 0);],
 
2515
[jpeg_CreateDecompress();],
2419
2516
            eval "ac_cv_lib_jpeg_$1=-ljpeg$2",
2420
2517
            eval "ac_cv_lib_jpeg_$1=no")
2421
2518
LIBS="$ac_save_LIBS"
2622
2719
AC_SUBST(LIBTIFF)
2623
2720
])
2624
2721
 
 
2722
AC_DEFUN([KDE_FIND_LIBEXR],
 
2723
[
 
2724
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
 
2725
AC_REQUIRE([AC_FIND_ZLIB])
 
2726
AC_CACHE_VAL(ac_cv_libexr,
 
2727
[
 
2728
  if test -z "$PKG_CONFIG"; then
 
2729
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
2730
  fi
 
2731
 
 
2732
  AC_MSG_CHECKING([for OpenEXR libraries])
 
2733
 
 
2734
  if test "$PKG_CONFIG" = "no" ; then
 
2735
     AC_MSG_RESULT(no)
 
2736
     echo "*** The pkg-config script could not be found. Make sure it is"
 
2737
     echo "*** in your path, or set the PKG_CONFIG environment variable"
 
2738
     echo "*** to the full path to pkg-config."
 
2739
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
 
2740
  else
 
2741
     if !(`$PKG_CONFIG --exists OpenEXR`) ; then
 
2742
        AC_MSG_RESULT(no)
 
2743
        EXRSTATUS=no
 
2744
     else
 
2745
        if !(`$PKG_CONFIG --atleast-version="1.1.1" OpenEXR`) ; then
 
2746
           AC_MSG_RESULT(no)
 
2747
           EXRSTATUS=old
 
2748
        else
 
2749
           kde_save_LIBS="$LIBS"
 
2750
           LIBS="$LIBS $all_libraries $USER_LDFLAGS $LIBZ `pkg-config --libs OpenEXR`"
 
2751
           AC_LANG_SAVE
 
2752
           AC_LANG_CPLUSPLUS
 
2753
           kde_save_CXXFLAGS="$CXXFLAGS"
 
2754
           EXR_FLAGS=`$PKG_CONFIG --cflags OpenEXR`
 
2755
           CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES $EXR_FLAGS"
 
2756
 
 
2757
           AC_TRY_LINK(dnl
 
2758
               [
 
2759
               #include <ImfRgbaFile.h>
 
2760
               ],
 
2761
               [
 
2762
               using namespace Imf;
 
2763
               RgbaInputFile file ("dummy");
 
2764
               return 0;
 
2765
               ],
 
2766
               eval "ac_cv_libexr='`pkg-config --libs OpenEXR`'",
 
2767
               eval "ac_cv_libexr=no"
 
2768
           )
 
2769
           LIBS="$kde_save_LIBS"
 
2770
           CXXFLAGS="$kde_save_CXXFLAGS"
 
2771
           AC_LANG_RESTORE
 
2772
           ])dnl
 
2773
           if eval "test ! \"`echo $ac_cv_libexr`\" = no"; then
 
2774
               AC_DEFINE_UNQUOTED(HAVE_EXR, 1, [Define if you have OpenEXR])
 
2775
               LIB_EXR="$ac_cv_libexr"
 
2776
               AC_MSG_RESULT($ac_cv_libexr)
 
2777
           else
 
2778
               AC_MSG_RESULT(no)
 
2779
               LIB_EXR=""
 
2780
           fi
 
2781
        fi
 
2782
     fi
 
2783
  fi
 
2784
  AC_SUBST(LIB_EXR)
 
2785
  AC_SUBST(EXR_FLAGS)
 
2786
])
 
2787
 
 
2788
 
2625
2789
 
2626
2790
AC_DEFUN([AC_FIND_PNG],
2627
2791
[
2761
2925
fi
2762
2926
])
2763
2927
 
 
2928
AC_DEFUN([KDE_CHECK_C_COMPILER_FLAG],
 
2929
[
 
2930
AC_MSG_CHECKING([whether $CC supports -$1])
 
2931
kde_cache=`echo $1 | sed 'y% .=/+-,%____p__%'`
 
2932
AC_CACHE_VAL(kde_cv_prog_cc_$kde_cache,
 
2933
[
 
2934
  AC_LANG_SAVE
 
2935
  AC_LANG_C
 
2936
  save_CFLAGS="$CFLAGS"
 
2937
  CFLAGS="$CFLAGS -$1"
 
2938
  AC_TRY_LINK([],[ return 0; ], [eval "kde_cv_prog_cc_$kde_cache=yes"], [])
 
2939
  CFLAGS="$save_CFLAGS"
 
2940
  AC_LANG_RESTORE
 
2941
])
 
2942
if eval "test \"`echo '$kde_cv_prog_cc_'$kde_cache`\" = yes"; then
 
2943
 AC_MSG_RESULT(yes)
 
2944
 :
 
2945
 $2
 
2946
else
 
2947
 AC_MSG_RESULT(no)
 
2948
 :
 
2949
 $3
 
2950
fi
 
2951
])
 
2952
 
 
2953
 
2764
2954
dnl AC_REMOVE_FORBIDDEN removes forbidden arguments from variables
2765
2955
dnl use: AC_REMOVE_FORBIDDEN(CC, [-forbid -bad-option whatever])
2766
2956
dnl it's all white-space separated
2784
2974
  fi
2785
2975
])
2786
2976
 
 
2977
 
 
2978
AC_DEFUN([KDE_CHECK_FOR_BAD_COMPILER],
 
2979
[
 
2980
  AC_MSG_CHECKING([whether $CC is blacklisted])
 
2981
 
 
2982
  dnl In theory we have tu run this test against $CC and $CXX
 
2983
  dnl in C and in C++ mode, because its perfectly legal for
 
2984
  dnl the user to mix compiler versions, since C has a defined
 
2985
  dnl ABI. 
 
2986
  dnl 
 
2987
  dnl For now, we assume the user is not on crack.
 
2988
 
 
2989
  AC_TRY_COMPILE([
 
2990
#ifdef __GNUC__
 
2991
#if __GNUC__ == 4 && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 0
 
2992
choke me
 
2993
#endif
 
2994
#endif
 
2995
], ,
 
2996
  kde_bad_compiler=no, 
 
2997
  kde_bad_compiler=yes
 
2998
)
 
2999
 
 
3000
  AC_MSG_RESULT($kde_bad_compiler)
 
3001
 
 
3002
if test "$kde_bad_compiler" = "yes"; then
 
3003
  AC_MSG_ERROR([
 
3004
 
 
3005
This particular compiler version is blacklisted because it
 
3006
is known to miscompile KDE. Please use a newer version, or
 
3007
if that is not yet available, choose an older version. 
 
3008
 
 
3009
Please do not report a bug or bother us reporting this
 
3010
configure error. We know about it, and we introduced
 
3011
it by intention to avoid untraceable bugs or crashes in KDE.
 
3012
 
 
3013
])
 
3014
fi
 
3015
 
 
3016
])
 
3017
 
2787
3018
dnl AC_VALIDIFY_CXXFLAGS checks for forbidden flags the user may have given
2788
3019
AC_DEFUN([AC_VALIDIFY_CXXFLAGS],
2789
3020
[dnl
2837
3068
    fi
2838
3069
   ], [kde_use_strict_options="no"])
2839
3070
 
2840
 
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similiar]),
 
3071
  AC_ARG_ENABLE(warnings,AC_HELP_STRING([--disable-warnings],[disables compilation with -Wall and similar]),
2841
3072
   [
2842
3073
    if test $enableval = "no"; then
2843
3074
         kde_use_warnings="no"
2893
3124
 
2894
3125
  AC_PROG_CXX
2895
3126
 
 
3127
  KDE_CHECK_FOR_BAD_COMPILER
 
3128
 
2896
3129
  if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
2897
3130
    if test "$kde_use_debug_code" != "no"; then
2898
3131
      if test "$CXX" = "KCC"; then
2932
3165
 
2933
3166
  if test "$kde_use_warnings" = "yes"; then
2934
3167
      if test "$GCC" = "yes"; then
 
3168
        CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
2935
3169
        case $host in
2936
3170
          *-*-linux-gnu)        
2937
 
            CFLAGS="-ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
 
3171
            CFLAGS="-std=iso9899:1990 -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
2938
3172
            CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS"
2939
 
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
 
3173
            KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
 
3174
            KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
2940
3175
          ;;
2941
3176
        esac
2942
 
        CXXFLAGS="-Wall -W -Wpointer-arith -Wwrite-strings $CXXFLAGS"
2943
3177
        KDE_CHECK_COMPILER_FLAG(Wundef,[CXXFLAGS="-Wundef $CXXFLAGS"])
2944
3178
        KDE_CHECK_COMPILER_FLAG(Wno-long-long,[CXXFLAGS="-Wno-long-long $CXXFLAGS"])
2945
 
        KDE_CHECK_COMPILER_FLAG(Wnon-virtual-dtor,[CXXFLAGS="-Wnon-virtual-dtor $CXXFLAGS"])
 
3179
        dnl ### FIXME: revert for KDE 4
 
3180
        KDE_CHECK_COMPILER_FLAG(Wno-non-virtual-dtor,[CXXFLAGS="$CXXFLAGS -Wno-non-virtual-dtor"])
2946
3181
     fi
2947
3182
  fi
2948
3183
 
2949
3184
  if test "$GXX" = "yes" && test "$kde_use_strict_options" = "yes"; then
2950
3185
    CXXFLAGS="-Wcast-qual -Wshadow -Wcast-align $CXXFLAGS"
2951
3186
  fi
2952
 
    
 
3187
 
 
3188
  AC_ARG_ENABLE(pch,
 
3189
     AC_HELP_STRING([--enable-pch],
 
3190
                    [enables precompiled header support (currently only KCC or gcc >=3.4+unsermake) [default=no]]),
 
3191
    [ kde_use_pch=$enableval ],[ kde_use_pch=no ])
 
3192
 
 
3193
  HAVE_GCC_VISIBILITY=0
 
3194
  AC_SUBST([HAVE_GCC_VISIBILITY])
 
3195
 
2953
3196
  if test "$GXX" = "yes"; then
2954
3197
    KDE_CHECK_COMPILER_FLAG(fno-exceptions,[CXXFLAGS="$CXXFLAGS -fno-exceptions"])
2955
3198
    KDE_CHECK_COMPILER_FLAG(fno-check-new, [CXXFLAGS="$CXXFLAGS -fno-check-new"])
2956
3199
    KDE_CHECK_COMPILER_FLAG(fno-common, [CXXFLAGS="$CXXFLAGS -fno-common"])
2957
3200
    KDE_CHECK_COMPILER_FLAG(fexceptions, [USE_EXCEPTIONS="-fexceptions"], USE_EXCEPTIONS=       )
 
3201
    ENABLE_PERMISSIVE_FLAG="-fpermissive"
 
3202
 
 
3203
    if test "$kde_use_pch" = "yes"; then
 
3204
        AC_MSG_CHECKING(whether gcc supports precompiling c header files)
 
3205
        echo >conftest.h
 
3206
        if $CC -x c-header conftest.h >/dev/null 2>/dev/null; then
 
3207
            kde_gcc_supports_pch=yes
 
3208
            AC_MSG_RESULT(yes)
 
3209
        else
 
3210
            kde_gcc_supports_pch=no
 
3211
            AC_MSG_RESULT(no)
 
3212
        fi
 
3213
        if test "$kde_gcc_supports_pch" = "yes"; then
 
3214
            AC_MSG_CHECKING(whether gcc supports precompiling c++ header files)
 
3215
            if $CXX -x c++-header conftest.h >/dev/null 2>/dev/null; then
 
3216
                kde_gcc_supports_pch=yes
 
3217
                AC_MSG_RESULT(yes)
 
3218
            else
 
3219
                kde_gcc_supports_pch=no
 
3220
                AC_MSG_RESULT(no)
 
3221
            fi
 
3222
        fi
 
3223
        rm -f conftest.h conftest.h.gch
 
3224
    fi
2958
3225
  fi
 
3226
  AM_CONDITIONAL(unsermake_enable_pch, test "$kde_use_pch" = "yes" && test "$kde_gcc_supports_pch" = "yes")
2959
3227
  if test "$CXX" = "KCC"; then
2960
3228
    dnl unfortunately we currently cannot disable exception support in KCC
2961
3229
    dnl because doing so is binary incompatible and Qt by default links with exceptions :-(
2962
3230
    dnl KDE_CHECK_COMPILER_FLAG(-no_exceptions,[CXXFLAGS="$CXXFLAGS --no_exceptions"])
2963
3231
    dnl KDE_CHECK_COMPILER_FLAG(-exceptions, [USE_EXCEPTIONS="--exceptions"], USE_EXCEPTIONS=   )
2964
3232
 
2965
 
    AC_ARG_ENABLE(pch,
2966
 
        AC_HELP_STRING([--enable-pch],
2967
 
                       [enables precompiled header support (currently only KCC) [default=no]]),
2968
 
    [
2969
 
      kde_use_pch=$enableval
2970
 
    ],[kde_use_pch=no])
2971
 
 
2972
3233
    if test "$kde_use_pch" = "yes"; then
2973
3234
      dnl TODO: support --pch-dir!
2974
3235
      KDE_CHECK_COMPILER_FLAG(-pch,[CXXFLAGS="$CXXFLAGS --pch"])
3023
3284
  fi
3024
3285
  KDE_CHECK_COMPILER_FLAG(O0,[NOOPT_CXXFLAGS=-O0])
3025
3286
 
 
3287
  AC_ARG_ENABLE(coverage,
 
3288
    AC_HELP_STRING([--enable-coverage],[use gcc coverage testing]), [
 
3289
      if test "$am_cv_CC_dependencies_compiler_type" = "gcc3"; then
 
3290
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
 
3291
        ac_coverage_linker="-lgcc"
 
3292
      elif test "$am_cv_CC_dependencies_compiler_type" = "gcc"; then
 
3293
        ac_coverage_compiler="-fprofile-arcs -ftest-coverage"
 
3294
        ac_coverage_linker=""
 
3295
      else
 
3296
        AC_MSG_ERROR([coverage with your compiler is not supported])
 
3297
      fi
 
3298
      CFLAGS="$CFLAGS $ac_coverage_compiler"
 
3299
      CXXFLAGS="$CXXFLAGS $ac_coverage_compiler"
 
3300
      LDFLAGS="$LDFLAGS $ac_coverage_linker"
 
3301
    ])
 
3302
 
3026
3303
  AC_SUBST(NOOPT_CXXFLAGS)
3027
3304
  AC_SUBST(NOOPT_CFLAGS)
 
3305
  AC_SUBST(ENABLE_PERMISSIVE_FLAG)
3028
3306
 
 
3307
  KDE_CHECK_NEW_LDFLAGS
3029
3308
  KDE_CHECK_FINAL
3030
3309
  KDE_CHECK_CLOSURE
3031
3310
  KDE_CHECK_NMCHECK
3033
3312
  ifdef([AM_DEPENDENCIES], AC_REQUIRE([KDE_ADD_DEPENDENCIES]), [])
3034
3313
])
3035
3314
 
 
3315
AC_DEFUN([KDE_CHECK_VISIBILITY_GCC_BUG],
 
3316
  [
 
3317
    AC_CACHE_CHECK([for gcc -fvisibility-inlines-hidden bug], kde_cv_val_gcc_visibility_bug,
 
3318
      [
 
3319
        AC_LANG_SAVE
 
3320
        AC_LANG_CPLUSPLUS
 
3321
 
 
3322
        safe_CXXFLAGS=$CXXFLAGS
 
3323
        safe_LDFLAGS=$LDFLAGS
 
3324
        CXXFLAGS="$CXXFLAGS -fPIC -fvisibility-inlines-hidden -O0"
 
3325
        LDFLAGS="$LDFLAGS -shared -fPIC"
 
3326
 
 
3327
        AC_TRY_LINK(
 
3328
        [
 
3329
          /* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19664 */
 
3330
          #include <string>
 
3331
          int some_function( void ) __attribute__ ((visibility("default")));
 
3332
          int some_function( void )
 
3333
          {
 
3334
            std::string s("blafasel");
 
3335
            return 0;
 
3336
          }
 
3337
        ], [/* elvis is alive */],
 
3338
        kde_cv_val_gcc_visibility_bug=no, kde_cv_val_gcc_visibility_bug=yes)
 
3339
 
 
3340
        CXXFLAGS=$safe_CXXFLAGS
 
3341
        LDFLAGS=$safe_LDFLAGS
 
3342
        AC_LANG_RESTORE
 
3343
      ]
 
3344
    )
 
3345
 
 
3346
    if test x$kde_cv_val_gcc_visibility_bug = xno; then
 
3347
      CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
 
3348
    fi
 
3349
  ]
 
3350
)
 
3351
 
 
3352
AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
 
3353
[
 
3354
  AC_BEFORE([AC_PATH_QT_1_3], [KDE_ENABLE_HIDDEN_VISIBILITY])
 
3355
 
 
3356
  AC_MSG_CHECKING([grepping for visibility push/pop in headers])
 
3357
 
 
3358
  if test "x$GXX" = "xyes"; then
 
3359
    AC_LANG_SAVE
 
3360
    AC_LANG_CPLUSPLUS
 
3361
    AC_EGREP_CPP(
 
3362
       [GCC visibility push],
 
3363
       [ #include <exception> 
 
3364
       ], 
 
3365
    [
 
3366
      AC_MSG_RESULT(yes)
 
3367
      kde_stdc_visibility_patched=yes ],
 
3368
    [ 
 
3369
      AC_MSG_RESULT(no)
 
3370
      AC_MSG_WARN([Your libstdc++ doesn't appear to be patched for 
 
3371
                   visibility support. Disabling -fvisibility=hidden])
 
3372
 
 
3373
      kde_stdc_visibility_patched=no ])
 
3374
 
 
3375
    AC_LANG_RESTORE
 
3376
 
 
3377
    kde_have_gcc_visibility=no
 
3378
    KDE_CHECK_COMPILER_FLAG(fvisibility=hidden, 
 
3379
    [
 
3380
      kde_have_gcc_visibility=yes
 
3381
      dnl the whole toolchain is just a mess, gcc is just too buggy
 
3382
      dnl to handle STL with visibility enabled. Lets reconsider 
 
3383
      dnl when gcc 4.2 is out or when things get fixed in the compiler.
 
3384
      dnl Contact mueller@kde.org for details.
 
3385
      AC_ARG_ENABLE(gcc-hidden-visibility,
 
3386
        AC_HELP_STRING([--enable-gcc-hidden-visibility],[toolchain hidden visibility [default=no]]),
 
3387
          [kde_have_gcc_visibility=$enableval],
 
3388
          [kde_have_gcc_visibility=no])
 
3389
 
 
3390
      AC_CACHE_CHECK([if Qt is patched for -fvisibility], kde_cv_val_qt_gcc_visibility_patched,
 
3391
        [
 
3392
          AC_LANG_SAVE
 
3393
          AC_LANG_CPLUSPLUS
 
3394
 
 
3395
          safe_CXXFLAGS=$CXXFLAGS
 
3396
          CXXFLAGS="$CXXFLAGS $all_includes"
 
3397
 
 
3398
          AC_TRY_COMPILE(
 
3399
          [
 
3400
#include <qglobal.h>
 
3401
#if Q_EXPORT - 0 != 0
 
3402
/* if this compiles, then Q_EXPORT is undefined */
 
3403
/* if Q_EXPORT is nonempty, this will break compilation */
 
3404
#endif
 
3405
          ], [/* elvis is alive */],
 
3406
          kde_cv_val_qt_gcc_visibility_patched=no, kde_cv_val_qt_gcc_visibility_patched=yes)
 
3407
 
 
3408
          CXXFLAGS=$safe_CXXFLAGS
 
3409
          AC_LANG_RESTORE
 
3410
        ]
 
3411
      )
 
3412
 
 
3413
      if test x$kde_have_gcc_visibility = "xyes" && test x$kde_stdc_visibility_patched = "xyes" && test x$kde_cv_val_qt_gcc_visibility_patched = "xyes"; then
 
3414
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
 
3415
        KDE_CHECK_VISIBILITY_GCC_BUG
 
3416
        HAVE_GCC_VISIBILITY=1
 
3417
        AC_DEFINE_UNQUOTED(__KDE_HAVE_GCC_VISIBILITY, "$HAVE_GCC_VISIBILITY", [define to 1 if -fvisibility is supported])
 
3418
      fi
 
3419
    ])
 
3420
  fi
 
3421
])
 
3422
 
3036
3423
AC_DEFUN([KDE_ADD_DEPENDENCIES],
3037
3424
[
3038
3425
   [A]M_DEPENDENCIES(CC)
3060
3447
KDE_PLUGIN="-avoid-version -module -no-undefined \$(KDE_NO_UNDEFINED) \$(KDE_RPATH) \$(KDE_MT_LDFLAGS)"
3061
3448
AC_SUBST(KDE_PLUGIN)
3062
3449
 
 
3450
# This hack ensures that libtool creates shared libs for kunittest plugins. By default check_LTLIBRARIES makes static libs.
 
3451
KDE_CHECK_PLUGIN="\$(KDE_PLUGIN) -rpath \$(libdir)"
 
3452
AC_SUBST(KDE_CHECK_PLUGIN)
 
3453
 
3063
3454
# we patch configure quite some so we better keep that consistent for incremental runs 
3064
3455
AC_SUBST(AUTOCONF,'$(SHELL) $(top_srcdir)/admin/cvs.sh configure || touch configure')
3065
3456
])
3066
3457
 
3067
3458
AC_DEFUN([KDE_CHECK_LIB64],
3068
3459
[
3069
 
    kdelibsuff=no
 
3460
    kdelibsuff="$kde_libs_suffix"
 
3461
    if test -z "$kdelibsuff"; then
 
3462
       kdelibsuff=no
 
3463
    fi
3070
3464
    AC_ARG_ENABLE(libsuffix,
3071
3465
        AC_HELP_STRING([--enable-libsuffix],
3072
3466
            [/lib directory suffix (64,32,none[=default])]),
3084
3478
            libdir="$libdir${kdelibsuff}"
3085
3479
            AC_SUBST([libdir], ["$libdir"])  dnl ugly hack for lib64 platforms
3086
3480
        fi
3087
 
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["\"${kdelibsuff}\""], Suffix for lib directories)
 
3481
        AC_DEFINE_UNQUOTED(KDELIBSUFF, ["${kdelibsuff}"], Suffix for lib directories)
3088
3482
        AC_MSG_RESULT([using lib directory suffix $kdelibsuff])
3089
3483
    fi
3090
3484
])
3096
3490
  AC_CHECK_SIZEOF(char *, 4)dnl
3097
3491
])dnl
3098
3492
 
 
3493
dnl Not used - kept for compat only?
3099
3494
AC_DEFUN([KDE_DO_IT_ALL],
3100
3495
[
3101
3496
AC_CANONICAL_SYSTEM
3118
3513
 
3119
3514
if test -z "$KDE_RPATH" && test "$USE_RPATH" = "yes"; then
3120
3515
 
3121
 
  KDE_RPATH="-R \$(kde_libraries)"
 
3516
  KDE_RPATH="-R \$(libdir)"
 
3517
 
 
3518
  if test "$kde_libraries" != "$libdir"; then
 
3519
      KDE_RPATH="$KDE_RPATH -R \$(kde_libraries)"
 
3520
  fi
3122
3521
 
3123
3522
  if test -n "$qt_libraries"; then
3124
3523
    KDE_RPATH="$KDE_RPATH -R \$(qt_libraries)"
3139
3538
])
3140
3539
 
3141
3540
dnl Check for the type of the third argument of getsockname
3142
 
AC_DEFUN([AC_CHECK_SOCKLEN_T], [
3143
 
  AC_MSG_CHECKING(for socklen_t)
3144
 
  AC_CACHE_VAL(ac_cv_socklen_t, [
3145
 
    AC_LANG_SAVE
3146
 
    AC_LANG_CPLUSPLUS
3147
 
    AC_TRY_COMPILE([
3148
 
#include <sys/types.h>
3149
 
#include <sys/socket.h>
3150
 
      ],[
3151
 
socklen_t a=0;
3152
 
getsockname(0,(struct sockaddr*)0, &a);
3153
 
      ],
3154
 
      ac_cv_socklen_t=socklen_t,
 
3541
AC_DEFUN([AC_CHECK_SOCKLEN_T],
 
3542
[
 
3543
   AC_MSG_CHECKING(for socklen_t)
 
3544
   AC_CACHE_VAL(kde_cv_socklen_t,
 
3545
   [
 
3546
      AC_LANG_PUSH(C++)
 
3547
      kde_cv_socklen_t=no
3155
3548
      AC_TRY_COMPILE([
3156
 
#include <sys/types.h>
3157
 
#include <sys/socket.h>
3158
 
        ],[
3159
 
int a=0;
3160
 
getsockname(0,(struct sockaddr*)0, &a);
3161
 
        ],
3162
 
        ac_cv_socklen_t=int,
3163
 
        ac_cv_socklen_t=size_t
3164
 
      )
3165
 
    )
3166
 
    AC_LANG_RESTORE
3167
 
  ])
3168
 
 
3169
 
  AC_MSG_RESULT($ac_cv_socklen_t)
3170
 
  if test "$ac_cv_socklen_t" != "socklen_t"; then
3171
 
    AC_DEFINE_UNQUOTED(socklen_t, $ac_cv_socklen_t,
3172
 
        [Define the real type of socklen_t])
3173
 
  fi
3174
 
  AC_DEFINE_UNQUOTED(ksize_t, socklen_t, [Compatibility define])
3175
 
 
 
3549
         #include <sys/types.h>
 
3550
         #include <sys/socket.h>
 
3551
      ],
 
3552
      [
 
3553
         socklen_t len;
 
3554
         getpeername(0,0,&len);
 
3555
      ],
 
3556
      [
 
3557
         kde_cv_socklen_t=yes
 
3558
         kde_cv_socklen_t_equiv=socklen_t
 
3559
      ])
 
3560
      AC_LANG_POP(C++)
 
3561
   ])
 
3562
   AC_MSG_RESULT($kde_cv_socklen_t)
 
3563
   if test $kde_cv_socklen_t = no; then
 
3564
      AC_MSG_CHECKING([for socklen_t equivalent for socket functions])
 
3565
      AC_CACHE_VAL(kde_cv_socklen_t_equiv,
 
3566
      [
 
3567
         kde_cv_socklen_t_equiv=int
 
3568
         AC_LANG_PUSH(C++)
 
3569
         for t in int size_t unsigned long "unsigned long"; do
 
3570
            AC_TRY_COMPILE([
 
3571
               #include <sys/types.h>
 
3572
               #include <sys/socket.h>
 
3573
            ],
 
3574
            [
 
3575
               $t len;
 
3576
               getpeername(0,0,&len);
 
3577
            ],
 
3578
            [
 
3579
               kde_cv_socklen_t_equiv="$t"
 
3580
               break
 
3581
            ])
 
3582
         done
 
3583
         AC_LANG_POP(C++)
 
3584
      ])
 
3585
      AC_MSG_RESULT($kde_cv_socklen_t_equiv)
 
3586
   fi
 
3587
   AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
 
3588
                     [type to use in place of socklen_t if not defined])
 
3589
   AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
 
3590
                     [type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
3176
3591
])
3177
3592
 
3178
3593
dnl This is a merge of some macros out of the gettext aclocal.m4
3464
3879
      ac_save_ldflags="$LDFLAGS"
3465
3880
      ac_save_cflags="$CFLAGS"
3466
3881
      ac_save_libs="$LIBS"
3467
 
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
 
3882
      LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries"
 
3883
      LIBS="-lX11 -lXext $LIBSOCKET"
3468
3884
      CFLAGS="$CFLAGS $X_INCLUDES"
3469
3885
      test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
3470
3886
      AC_TRY_LINK([
3475
3891
          int foo_test_dpms()
3476
3892
          { return DPMSSetTimeouts( 0, 0, 0, 0 ); }],[],
3477
3893
          ac_cv_have_dpms="yes", [
3478
 
              LDFLAGS="$ac_save_ldflags"
3479
 
              CFLAGS="$ac_save_cflags"
3480
 
              LDFLAGS="$LDFLAGS $DPMS_LDFLAGS $all_libraries -lX11 -lXext $LIBSOCKET"
3481
 
              LIBS="$LIBS -lXdpms"
3482
 
              CFLAGS="$CFLAGS $X_INCLUDES"
3483
 
              test -n "$DPMS_INCLUDE" && CFLAGS="-I$DPMS_INCLUDE $CFLAGS"
 
3894
              LIBS="-lXdpms $LIBS"
3484
3895
              AC_TRY_LINK([
3485
3896
                  #include <X11/Xproto.h>
3486
3897
                  #include <X11/X.h>
3529
3940
   [Define if you have the DPMSCapable prototype in <X11/extensions/dpms.h>])
3530
3941
 AC_CHECK_DECL(DPMSCapable,
3531
3942
   AC_DEFINE(HAVE_DPMSCAPABLE_PROTO),,
3532
 
   [#include <X11/extensions/dpms.h>])
 
3943
   [#include <X11/Xlib.h>
 
3944
   #include <X11/extensions/dpms.h>])
3533
3945
 AH_TEMPLATE(HAVE_DPMSINFO_PROTO,
3534
3946
   [Define if you have the DPMSInfo prototype in <X11/extensions/dpms.h>])
3535
3947
 AC_CHECK_DECL(DPMSInfo,
3536
3948
   AC_DEFINE(HAVE_DPMSINFO_PROTO),,
3537
 
   [#include <X11/extensions/dpms.h>])
 
3949
   [#include <X11/Xlib.h>
 
3950
   #include <X11/extensions/dpms.h>])
3538
3951
 CFLAGS="$ac_save_cflags"
3539
3952
 AC_SUBST(DPMSINC)
3540
3953
 AC_SUBST(DPMSLIB)
3560
3973
   [
3561
3974
    AC_LANG_SAVE
3562
3975
    AC_LANG_CPLUSPLUS
3563
 
    ac_save_ldflags="$LDFLAGS"
3564
 
    ac_save_cxxflags="$CXXFLAGS"
3565
 
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries -lMesaGL -lMesaGLU"
3566
 
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3567
 
    LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
 
3976
    ac_save_ldflags=$LDFLAGS
 
3977
    ac_save_cxxflags=$CXXFLAGS
 
3978
    ac_save_libs=$LIBS
 
3979
    LDFLAGS="$LDFLAGS $GL_LDFLAGS $X_LDFLAGS $all_libraries"
 
3980
    LIBS="$LIBS -lGL -lGLU"
 
3981
    test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LIBS="$LIBS -lX11"
 
3982
    LIBS="$LIBS $LIB_XEXT -lm $LIBSOCKET"
3568
3983
    CXXFLAGS="$CFLAGS $X_INCLUDES"
3569
3984
    test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3570
3985
    AC_TRY_LINK([#include <GL/gl.h>
3571
3986
#include <GL/glu.h>
3572
3987
], [],
3573
 
        ac_cv_have_gl="mesa", ac_cv_have_gl="no")
3574
 
    if test "x$ac_cv_have_gl" = "xno"; then
3575
 
      LDFLAGS="$ac_save_ldflags $X_LDFLAGS $GL_LDFLAGS $all_libraries -lGLU -lGL"
3576
 
      test "x$kde_use_qt_mac" != xyes && test "x$kde_use_qt_emb" != xyes && LDFLAGS="$LDFLAGS -lX11"
3577
 
      LDFLAGS="$LDFLAGS $LIB_XEXT -lm $LIBSOCKET"
3578
 
      CXXFLAGS="$ac_save_cflags $X_INCLUDES"
3579
 
      test -n "$GL_INCLUDE" && CFLAGS="-I$GL_INCLUDE $CFLAGS"
3580
 
      AC_TRY_LINK([#include <GL/gl.h>
3581
 
#include <GL/glu.h>
3582
 
], [],
3583
 
          ac_cv_have_gl="yes", ac_cv_have_gl="no")
3584
 
    fi
 
3988
        ac_cv_have_gl="yes", ac_cv_have_gl="no")
3585
3989
    AC_LANG_RESTORE
3586
 
    LDFLAGS="$ac_save_ldflags"
3587
 
    CXXFLAGS="$ac_save_cxxflags"
 
3990
    LDFLAGS=$ac_save_ldflags
 
3991
    CXXFLAGS=$ac_save_cxxflags
 
3992
    LIBS=$ac_save_libs
3588
3993
   ])dnl
3589
3994
 
3590
3995
  if test "$ac_cv_have_gl" = "no"; then
3595
4000
  else
3596
4001
    AC_DEFINE(HAVE_GL, 1, [Defines if you have GL (Mesa, OpenGL, ...)])
3597
4002
    if test "$GL_LDFLAGS" = ""; then
3598
 
       if test "$ac_cv_have_gl" = "mesa"; then
3599
 
          GLLIB='-lMesaGLU -lMesaGL $(LIB_X11)'
3600
 
       else
3601
 
          GLLIB='-lGLU -lGL $(LIB_X11)'
3602
 
       fi
 
4003
       GLLIB='-lGLU -lGL $(LIB_X11)'
3603
4004
    else
3604
 
       if test "$ac_cv_have_gl" = "mesa"; then
3605
 
          GLLIB="$GL_LDFLAGS -lMesaGLU -lMesaGL "'$(LIB_X11)'
3606
 
       else
3607
 
          GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3608
 
       fi
 
4005
       GLLIB="$GL_LDFLAGS -lGLU -lGL "'$(LIB_X11)'
3609
4006
    fi
3610
4007
    if test "$GL_INCLUDE" = ""; then
3611
4008
       GLINC=""
3904
4301
 
3905
4302
AC_DEFUN([KDE_CHECK_LIBPTHREAD],
3906
4303
[
 
4304
  dnl This code is here specifically to handle the
 
4305
  dnl various flavors of threading library on FreeBSD
 
4306
  dnl 4-, 5-, and 6-, and the (weird) rules around it.
 
4307
  dnl There may be an environment PTHREAD_LIBS that 
 
4308
  dnl specifies what to use; otherwise, search for it.
 
4309
  dnl -pthread is special cased and unsets LIBPTHREAD
 
4310
  dnl below if found.
3907
4311
  LIBPTHREAD=""
3908
4312
 
3909
4313
  if test -n "$PTHREAD_LIBS"; then
3910
 
    PTHREAD_LIBS_save="$PTHREAD_LIBS"
3911
 
    PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
3912
 
    KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [LIBPTHREAD="$PTHREAD_LIBS_save"] )
3913
 
    PTHREAD_LIBS="$PTHREAD_LIBS_save"
 
4314
    if test "x$PTHREAD_LIBS" = "x-pthread" ; then
 
4315
      LIBPTHREAD="PTHREAD"
 
4316
    else
 
4317
      PTHREAD_LIBS_save="$PTHREAD_LIBS"
 
4318
      PTHREAD_LIBS=`echo "$PTHREAD_LIBS_save" | sed -e 's,^-l,,g'`
 
4319
      AC_MSG_CHECKING([for pthread_create in $PTHREAD_LIBS])
 
4320
      KDE_CHECK_LIB($PTHREAD_LIBS, pthread_create, [
 
4321
          LIBPTHREAD="$PTHREAD_LIBS_save"])
 
4322
      PTHREAD_LIBS="$PTHREAD_LIBS_save"
 
4323
    fi
3914
4324
  fi
3915
4325
 
 
4326
  dnl Is this test really needed, in the face of the Tru64 test below?
3916
4327
  if test -z "$LIBPTHREAD"; then
3917
 
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"] )
 
4328
    AC_CHECK_LIB(pthread, pthread_create, [LIBPTHREAD="-lpthread"])
 
4329
  fi
 
4330
 
 
4331
  dnl This is a special Tru64 check, see BR 76171 issue #18.
 
4332
  if test -z "$LIBPTHREAD" ; then
 
4333
    AC_MSG_CHECKING([for pthread_create in -lpthread])
 
4334
    kde_safe_libs=$LIBS
 
4335
    LIBS="$LIBS -lpthread"
 
4336
    AC_TRY_LINK([#include <pthread.h>],[(void)pthread_create(0,0,0,0);],[
 
4337
        AC_MSG_RESULT(yes)
 
4338
        LIBPTHREAD="-lpthread"],[
 
4339
        AC_MSG_RESULT(no)])
 
4340
    LIBS=$kde_safe_libs
 
4341
  fi
 
4342
 
 
4343
  dnl Un-special-case for FreeBSD.
 
4344
  if test "x$LIBPTHREAD" = "xPTHREAD" ; then
 
4345
    LIBPTHREAD=""
3918
4346
  fi
3919
4347
 
3920
4348
  AC_SUBST(LIBPTHREAD)
4144
4572
 
4145
4573
AC_DEFUN([KDE_CHECK_PYTHON],
4146
4574
[
4147
 
  KDE_CHECK_PYTHON_INTERN("2.3", 
4148
 
   [KDE_CHECK_PYTHON_INTERN("2.2", 
4149
 
     [KDE_CHECK_PYTHON_INTERN("2.1", 
4150
 
       [KDE_CHECK_PYTHON_INTERN("2.0", 
4151
 
         [KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4575
  KDE_CHECK_PYTHON_INTERN("2.4",
 
4576
   [KDE_CHECK_PYTHON_INTERN("2.3", 
 
4577
     [KDE_CHECK_PYTHON_INTERN("2.2", 
 
4578
       [KDE_CHECK_PYTHON_INTERN("2.1", 
 
4579
         [KDE_CHECK_PYTHON_INTERN("2.0", 
 
4580
           [KDE_CHECK_PYTHON_INTERN($1, $2) ])
 
4581
         ])
4152
4582
       ])
4153
4583
     ])
4154
 
   ])
 
4584
  ])
4155
4585
])
4156
4586
 
4157
4587
AC_DEFUN([KDE_CHECK_STL],
4183
4613
   else
4184
4614
         AC_MSG_ERROR([Your Installation isn't able to compile simple C++ programs.
4185
4615
Check config.log for details - if you're using a Linux distribution you might miss
4186
 
a package named similiar to libstd++-dev.])
 
4616
a package named similar to libstdc++-dev.])
4187
4617
   fi
4188
4618
 
4189
4619
   CXXFLAGS="$ac_save_CXXFLAGS"
4275
4705
[
4276
4706
 
4277
4707
DO_NOT_COMPILE="$DO_NOT_COMPILE CVS debian bsd-port admin"
 
4708
TOPSUBDIRS=""
4278
4709
 
4279
4710
if test ! -s $srcdir/subdirs; then
4280
4711
  dnl Note: Makefile.common creates subdirs, so this is just a fallback
4281
 
  TOPSUBDIRS=""
4282
4712
  files=`cd $srcdir && ls -1`
4283
4713
  dirs=`for i in $files; do if test -d $i; then echo $i; fi; done`
4284
4714
  for i in $dirs; do
4306
4736
    install_it="no"
4307
4737
  fi
4308
4738
  AC_MSG_RESULT($install_it)
4309
 
  vari=`echo $i | sed -e 's,[[-+.]],_,g'`
 
4739
  vari=`echo $i | sed -e 's,[[-+.@]],_,g'`
4310
4740
  if test $install_it = "yes"; then
4311
4741
    TOPSUBDIRS="$TOPSUBDIRS $i"
4312
4742
    eval "$vari""_SUBDIR_included=yes"
4419
4849
 
4420
4850
AC_DEFUN([KDE_CHECK_HEADER],
4421
4851
[
4422
 
   AC_LANG_SAVE
4423
4852
   kde_safe_cppflags=$CPPFLAGS
4424
4853
   CPPFLAGS="$CPPFLAGS $all_includes"
 
4854
   AC_LANG_SAVE
4425
4855
   AC_LANG_CPLUSPLUS
4426
4856
   AC_CHECK_HEADER([$1], [$2], [$3], [$4])
 
4857
   AC_LANG_RESTORE
4427
4858
   CPPFLAGS=$kde_safe_cppflags
4428
 
   AC_LANG_RESTORE
4429
4859
])
4430
4860
 
4431
4861
AC_DEFUN([KDE_CHECK_HEADERS],
4462
4892
  AC_SUBST(CONF_FILES)
4463
4893
])dnl
4464
4894
 
4465
 
AC_DEFUN([KDE_SET_PREFIX],
 
4895
dnl This sets the prefix, for arts and kdelibs
 
4896
dnl Do NOT use in any other module.
 
4897
dnl It only looks at --prefix, KDEDIR and falls back to /usr/local/kde
 
4898
AC_DEFUN([KDE_SET_PREFIX_CORE],
4466
4899
[
4467
4900
  unset CDPATH
4468
4901
  dnl make $KDEDIR the default for the installation
4475
4908
  # And delete superfluous '/' to make compares easier
4476
4909
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
4477
4910
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4911
 
 
4912
  kde_libs_prefix='$(prefix)'
 
4913
  kde_libs_htmldir='$(kde_htmldir)'
 
4914
  AC_SUBST(kde_libs_prefix)
 
4915
  AC_SUBST(kde_libs_htmldir)
 
4916
  KDE_FAST_CONFIGURE
 
4917
  KDE_CONF_FILES
 
4918
])
 
4919
 
 
4920
 
 
4921
AC_DEFUN([KDE_SET_PREFIX],
 
4922
[
 
4923
  unset CDPATH
 
4924
  dnl We can't give real code to that macro, only a value.
 
4925
  dnl It only matters for --help, since we set the prefix in this function anyway.
 
4926
  AC_PREFIX_DEFAULT(${KDEDIR:-the kde prefix})
 
4927
 
 
4928
  KDE_SET_DEFAULT_BINDIRS
 
4929
  if test "x$prefix" = "xNONE"; then
 
4930
    dnl no prefix given: look for kde-config in the PATH and deduce the prefix from it
 
4931
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
 
4932
  else
 
4933
    dnl prefix given: look for kde-config, preferrably in prefix, otherwise in PATH
 
4934
    kde_save_PATH="$PATH"
 
4935
    PATH="$exec_prefix/bin:$prefix/bin:$PATH"
 
4936
    KDE_FIND_PATH(kde-config, KDECONFIG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(kde-config)], [], prepend)
 
4937
    PATH="$kde_save_PATH"
 
4938
  fi
 
4939
 
 
4940
  kde_libs_prefix=`$KDECONFIG --prefix`
 
4941
  if test -z "$kde_libs_prefix" || test ! -x "$kde_libs_prefix"; then
 
4942
       AC_MSG_ERROR([$KDECONFIG --prefix outputed the non existant prefix '$kde_libs_prefix' for kdelibs.
 
4943
                    This means it has been moved since you installed it.
 
4944
                    This won't work. Please recompile kdelibs for the new prefix.
 
4945
                    ])
 
4946
  fi
 
4947
  kde_libs_htmldir=`$KDECONFIG --install html --expandvars`
 
4948
  kde_libs_suffix=`$KDECONFIG --libsuffix`
 
4949
 
 
4950
  AC_MSG_CHECKING([where to install])
 
4951
  if test "x$prefix" = "xNONE"; then
 
4952
    prefix=$kde_libs_prefix
 
4953
    AC_MSG_RESULT([$prefix (as returned by kde-config)])
 
4954
  else
 
4955
    dnl --prefix was given. Compare prefixes and warn (in configure.in.bot.end) if different
 
4956
    given_prefix=$prefix
 
4957
    AC_MSG_RESULT([$prefix (as requested)])
 
4958
  fi
 
4959
 
 
4960
  # And delete superfluous '/' to make compares easier
 
4961
  prefix=`echo "$prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4962
  exec_prefix=`echo "$exec_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4963
  given_prefix=`echo "$given_prefix" | sed 's,//*,/,g' | sed -e 's,/$,,'`
 
4964
 
 
4965
  AC_SUBST(KDECONFIG)
 
4966
  AC_SUBST(kde_libs_prefix)
 
4967
  AC_SUBST(kde_libs_htmldir)
 
4968
 
4478
4969
  KDE_FAST_CONFIGURE
4479
4970
  KDE_CONF_FILES
4480
4971
])
5351
5842
        ])
5352
5843
    AC_SUBST(PERL)
5353
5844
])
 
5845
 
 
5846
AC_DEFUN([KDE_CHECK_LARGEFILE],
 
5847
[
 
5848
AC_SYS_LARGEFILE
 
5849
if test "$ac_cv_sys_file_offset_bits" != no; then
 
5850
  CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
 
5851
fi
 
5852
 
 
5853
if test "x$ac_cv_sys_large_files" != "xno"; then
 
5854
  CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=1"
 
5855
fi
 
5856
 
 
5857
])
 
5858
 
 
5859
dnl A small extension to PKG_CHECK_MODULES (defined in pkg.m4.in)
 
5860
dnl which allows to search for libs that get installed into the KDE prefix.
 
5861
dnl
 
5862
dnl Syntax:  KDE_PKG_CHECK_MODULES(KSTUFF, libkexif >= 0.2 glib = 1.3.4, action-if, action-not)
 
5863
dnl defines KSTUFF_LIBS, KSTUFF_CFLAGS, see pkg-config man page
 
5864
dnl also defines KSTUFF_PKG_ERRORS on error
 
5865
AC_DEFUN([KDE_PKG_CHECK_MODULES], [
 
5866
 
 
5867
   PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
 
5868
   if test "$prefix" != "$kde_libs_prefix"; then
 
5869
       PKG_CONFIG_PATH="$kde_libs_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
 
5870
   fi
 
5871
   export PKG_CONFIG_PATH
 
5872
   PKG_CHECK_MODULES($1,$2,$3,$4)
 
5873
])
 
5874
 
 
5875
 
 
5876
dnl Check for PIE support in the compiler and linker
 
5877
AC_DEFUN([KDE_CHECK_PIE_SUPPORT],
 
5878
[
 
5879
  AC_CACHE_CHECK([for PIE support], kde_cv_val_pie_support,
 
5880
  [
 
5881
    AC_LANG_SAVE
 
5882
    AC_LANG_CPLUSPLUS
 
5883
    safe_CXXFLAGS=$CXXFLAGS
 
5884
    safe_LDFLAGS=$LDFLAGS
 
5885
    CXXFLAGS="$CXXFLAGS -fpie"
 
5886
    LDFLAGS="$LDFLAGS -pie"
 
5887
 
 
5888
    AC_TRY_LINK([int foo;], [], [kde_cv_val_pie_support=yes], [kde_cv_val_pie_support=no])
 
5889
 
 
5890
    CXXFLAGS=$safe_CXXFLAGS
 
5891
    LDFLAGS=$safe_LDFLAGS
 
5892
    AC_LANG_RESTORE
 
5893
  ])
 
5894
 
 
5895
  AC_MSG_CHECKING(if enabling -pie/fpie support)
 
5896
 
 
5897
  AC_ARG_ENABLE(pie,
 
5898
    AC_HELP_STRING([--enable-pie],[platform supports PIE linking [default=detect]]),
 
5899
      [kde_has_pie_support=$enableval],
 
5900
      [kde_has_pie_support=detect])
 
5901
 
 
5902
  if test "$kde_has_pie_support" = "detect"; then
 
5903
    kde_has_pie_support=$kde_cv_val_pie_support
 
5904
  fi
 
5905
 
 
5906
  AC_MSG_RESULT([$kde_has_pie_support])
 
5907
 
 
5908
  KDE_USE_FPIE=""
 
5909
  KDE_USE_PIE=""
 
5910
 
 
5911
  AC_SUBST([KDE_USE_FPIE])
 
5912
  AC_SUBST([KDE_USE_PIE])
 
5913
 
 
5914
  if test "$kde_has_pie_support" = "yes"; then
 
5915
    KDE_USE_FPIE="-fpie"
 
5916
    KDE_USE_PIE="-pie"
 
5917
  fi
 
5918
])
5354
5919
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
5355
5920
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
5356
5921
## Free Software Foundation, Inc.
5368
5933
##
5369
5934
## You should have received a copy of the GNU General Public License
5370
5935
## along with this program; if not, write to the Free Software
5371
 
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
5936
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5372
5937
##
5373
5938
## As a special exception to the GNU General Public License, if you
5374
5939
## distribute this file as part of a program that contains a
6626
7191
  dynamic_linker=no
6627
7192
  ;;
6628
7193
 
6629
 
freebsd*-gnu*)
 
7194
kfreebsd*-gnu*)
6630
7195
  version_type=linux
6631
7196
  need_lib_prefix=no
6632
7197
  need_version=no
7447
8012
  lt_cv_file_magic_test_file=/shlib/libc.so
7448
8013
  ;;
7449
8014
 
7450
 
cygwin* | mingw* | pw32*)
 
8015
cygwin*)
 
8016
  lt_cv_deplibs_check_method=pass_all
 
8017
  ;;
 
8018
  
 
8019
mingw* | pw32*)
7451
8020
  # win32_libid is a shell function defined in ltmain.sh
7452
8021
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
7453
8022
  lt_cv_file_magic_cmd='win32_libid'
7468
8037
  lt_cv_deplibs_check_method=pass_all
7469
8038
  ;;
7470
8039
 
7471
 
freebsd*)
 
8040
freebsd* | kfreebsd*-gnu)
7472
8041
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
7473
8042
    case $host_cpu in
7474
8043
    i*86 )
7909
8478
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7910
8479
    case "$host_os" in
7911
8480
    rhapsody* | darwin1.[[012]])
7912
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
8481
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
7913
8482
      ;;
7914
8483
    *) # Darwin 1.3 on
7915
 
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
8484
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
8485
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
8486
      else
 
8487
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
8488
          10.[012])
 
8489
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
8490
            ;;
 
8491
          10.*)
 
8492
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
 
8493
            ;;
 
8494
        esac
 
8495
      fi
7916
8496
      ;;
7917
8497
    esac
7918
8498
    output_verbose_link_cmd='echo'
7919
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
7920
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
8499
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
 
8500
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
7921
8501
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
7922
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7923
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8502
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag  -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8503
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7924
8504
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
7925
8505
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7926
8506
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8037
8617
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
8038
8618
  # archiving commands below assume that GNU ld is being used.
8039
8619
  if test "$with_gnu_ld" = yes; then
8040
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8041
 
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
8620
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
 
8621
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8042
8622
 
8043
8623
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8044
8624
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8064
8644
    # linker, instead of GNU ld.  If possible, this setting should
8065
8645
    # overridden to take advantage of the native linker features on
8066
8646
    # the platform it is being used on.
8067
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
8647
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $lib'
8068
8648
  fi
8069
8649
 
8070
8650
  # Commands to make compiler produce verbose output that lists
8158
8738
      _LT_AC_SYS_LIBPATH_AIX
8159
8739
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8160
8740
 
8161
 
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
8162
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
8741
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
8742
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8163
8743
     else
8164
8744
      if test "$host_cpu" = ia64; then
8165
8745
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8166
8746
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8167
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
8747
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8168
8748
      else
8169
8749
        # Determine the default libpath from the value encoded in an empty executable.
8170
8750
        _LT_AC_SYS_LIBPATH_AIX
8179
8759
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8180
8760
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8181
8761
        # This is similar to how AIX traditionally builds it's shared libraries.
8182
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
8762
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8183
8763
      fi
8184
8764
    fi
8185
8765
    ;;
8196
8776
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8197
8777
    # as there is no search path for DLLs.
8198
8778
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8199
 
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
8779
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
8200
8780
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
8201
8781
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8202
8782
 
8203
8783
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8204
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
8784
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8205
8785
      # If the export-symbols file already is a .def file (1st line
8206
8786
      # is EXPORTS), use it as is; otherwise, prepend...
8207
8787
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8210
8790
        echo EXPORTS > $output_objdir/$soname.def;
8211
8791
        cat $export_symbols >> $output_objdir/$soname.def;
8212
8792
      fi~
8213
 
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
8793
      $CC -shared -nostdlib $output_objdir/$soname.def $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8214
8794
    else
8215
8795
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8216
8796
    fi
8221
8801
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8222
8802
    case "$host_os" in
8223
8803
    rhapsody* | darwin1.[[012]])
8224
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
8804
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
8225
8805
      ;;
8226
8806
    *) # Darwin 1.3 on
8227
 
      test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
8807
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
8808
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
8809
      else
 
8810
        case ${MACOSX_DEPLOYMENT_TARGET} in
 
8811
          10.[012])
 
8812
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
8813
            ;;
 
8814
          10.*)
 
8815
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
 
8816
            ;;
 
8817
        esac
 
8818
      fi
8228
8819
      ;;
8229
8820
    esac
8230
8821
    lt_int_apple_cc_single_mod=no
8233
8824
      lt_int_apple_cc_single_mod=yes
8234
8825
    fi
8235
8826
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8236
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
8827
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
8237
8828
    else
8238
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
8829
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
8239
8830
    fi
8240
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
8831
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
8241
8832
 
8242
8833
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
8243
8834
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
8244
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8835
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8245
8836
    else
8246
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8837
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8247
8838
    fi
8248
 
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
8839
    _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8249
8840
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
8250
8841
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8251
8842
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8280
8871
  freebsd-elf*)
8281
8872
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8282
8873
    ;;
8283
 
  freebsd*)
 
8874
  freebsd* | kfreebsd*-gnu)
8284
8875
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8285
8876
    # conventions
8286
8877
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8302
8893
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8303
8894
      ;;
8304
8895
    aCC)
8305
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
8896
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8306
8897
      # Commands to make compiler produce verbose output that lists
8307
8898
      # what "hidden" libraries, object files and flags are used when
8308
8899
      # linking a shared library.
8315
8906
      ;;
8316
8907
    *)
8317
8908
      if test "$GXX" = yes; then
8318
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
8909
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8319
8910
      else
8320
8911
        # FIXME: insert proper C++ library support
8321
8912
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
8372
8963
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8373
8964
          ;;
8374
8965
        *)
8375
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8966
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8376
8967
          ;;
8377
8968
        esac
8378
8969
        # Commands to make compiler produce verbose output that lists
8393
8984
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
8394
8985
              ;;
8395
8986
            *)
8396
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
8987
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8397
8988
              ;;
8398
8989
            esac
8399
8990
          fi
8408
8999
    case $cc_basename in
8409
9000
      CC)
8410
9001
        # SGI C++
8411
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
9002
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8412
9003
 
8413
9004
        # Archives containing C++ object files must be created using
8414
9005
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8419
9010
      *)
8420
9011
        if test "$GXX" = yes; then
8421
9012
          if test "$with_gnu_ld" = no; then
8422
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
9013
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8423
9014
          else
8424
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 
9015
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
8425
9016
          fi
8426
9017
        fi
8427
9018
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8438
9029
        # KCC will only create a shared library if the output file
8439
9030
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8440
9031
        # to its proper name (with version) after linking.
8441
 
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8442
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
9032
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
 
9033
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8443
9034
        # Commands to make compiler produce verbose output that lists
8444
9035
        # what "hidden" libraries, object files and flags are used when
8445
9036
        # linking a shared library.
8461
9052
        # Intel C++
8462
9053
        with_gnu_ld=yes
8463
9054
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8464
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8465
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
9055
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
 
9056
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8466
9057
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8467
9058
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8468
9059
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8469
9060
        ;;
8470
9061
      cxx)
8471
9062
        # Compaq C++
8472
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8473
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
9063
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname -o $lib'
 
9064
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8474
9065
 
8475
9066
        runpath_var=LD_RUN_PATH
8476
9067
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8527
9118
        # KCC will only create a shared library if the output file
8528
9119
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8529
9120
        # to its proper name (with version) after linking.
8530
 
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
9121
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8531
9122
 
8532
9123
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8533
9124
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8544
9135
        ;;
8545
9136
      cxx)
8546
9137
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8547
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
9138
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8548
9139
 
8549
9140
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8550
9141
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8562
9153
      *)
8563
9154
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8564
9155
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8565
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
9156
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8566
9157
 
8567
9158
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8568
9159
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8587
9178
        # KCC will only create a shared library if the output file
8588
9179
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
8589
9180
        # to its proper name (with version) after linking.
8590
 
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
9181
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects --soname $soname -o \$templib; mv \$templib $lib'
8591
9182
 
8592
9183
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8593
9184
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8603
9194
        ;;
8604
9195
      cxx)
8605
9196
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8606
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
9197
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8607
9198
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8608
9199
          echo "-hidden">> $lib.exp~
8609
 
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
 
9200
          $CC -shared$allow_undefined_flag $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
8610
9201
          $rm $lib.exp'
8611
9202
 
8612
9203
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8625
9216
      *)
8626
9217
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8627
9218
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8628
 
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
9219
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8629
9220
 
8630
9221
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8631
9222
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8682
9273
      CC)
8683
9274
        # Sun C++ 4.2, 5.x and Centerline C++
8684
9275
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8685
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
9276
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects'
8686
9277
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8687
 
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
9278
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
8688
9279
 
8689
9280
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8690
9281
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8718
9309
        ;;
8719
9310
      gcx)
8720
9311
        # Green Hills C++ Compiler
8721
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
9312
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
8722
9313
 
8723
9314
        # The C++ compiler must be used to create the archive.
8724
9315
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8728
9319
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8729
9320
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8730
9321
          if $CC --version | grep -v '^2\.7' > /dev/null; then
8731
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
9322
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
8732
9323
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8733
 
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
9324
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
8734
9325
 
8735
9326
            # Commands to make compiler produce verbose output that lists
8736
9327
            # what "hidden" libraries, object files and flags are used when
8739
9330
          else
8740
9331
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
8741
9332
            # platform.
8742
 
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
9333
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects ${wl}-h $wl$soname -o $lib'
8743
9334
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8744
 
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
9335
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $compiler_flags $predep_objects $libobjs $deplibs $postdep_objects~$rm $lib.exp'
8745
9336
 
8746
9337
            # Commands to make compiler produce verbose output that lists
8747
9338
            # what "hidden" libraries, object files and flags are used when
9269
9860
#
9270
9861
# You should have received a copy of the GNU General Public License
9271
9862
# along with this program; if not, write to the Free Software
9272
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
9863
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9273
9864
#
9274
9865
# As a special exception to the GNU General Public License, if you
9275
9866
# distribute this file as part of a program that contains a
9926
10517
            ;;
9927
10518
        esac
9928
10519
        ;;
9929
 
      freebsd*)
 
10520
      freebsd* | kfreebsd*-gnu)
9930
10521
        # FreeBSD uses GNU C++
9931
10522
        ;;
9932
10523
      hpux9* | hpux10* | hpux11*)
10411
11002
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10412
11003
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
10413
11004
        # support --undefined.  This deserves some investigation.  FIXME
10414
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
11005
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
10415
11006
      else
10416
11007
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10417
11008
      fi
10421
11012
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
10422
11013
      # as there is no search path for DLLs.
10423
11014
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10424
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11015
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10425
11016
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
10426
11017
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10427
11018
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
10428
11019
 
10429
11020
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
10430
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
11021
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
10431
11022
        # If the export-symbols file already is a .def file (1st line
10432
11023
        # is EXPORTS), use it as is; otherwise, prepend...
10433
11024
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10436
11027
          echo EXPORTS > $output_objdir/$soname.def;
10437
11028
          cat $export_symbols >> $output_objdir/$soname.def;
10438
11029
        fi~
10439
 
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
11030
        $CC -shared $output_objdir/$soname.def $compiler_flags $libobjs $deplibs -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
10440
11031
      else
10441
11032
        ld_shlibs=no
10442
11033
      fi
10447
11038
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10448
11039
        wlarc=
10449
11040
      else
10450
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10451
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
11041
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
 
11042
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10452
11043
      fi
10453
11044
      ;;
10454
11045
 
10466
11057
 
10467
11058
EOF
10468
11059
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10469
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10470
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
11060
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
 
11061
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10471
11062
      else
10472
11063
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10473
11064
      fi
10482
11073
 
10483
11074
    *)
10484
11075
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
10485
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
10486
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
11076
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname -o $lib'
 
11077
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
10487
11078
      else
10488
11079
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
10489
11080
      fi
10597
11188
       # Determine the default libpath from the value encoded in an empty executable.
10598
11189
        _LT_AC_SYS_LIBPATH_AIX
10599
11190
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
10600
 
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
10601
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
11191
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '" $shared_flag"
 
11192
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
10602
11193
       else
10603
11194
        if test "$host_cpu" = ia64; then
10604
11195
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
10605
11196
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
10606
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
11197
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
10607
11198
        else
10608
11199
         # Determine the default libpath from the value encoded in an empty executable.
10609
11200
         _LT_AC_SYS_LIBPATH_AIX
10618
11209
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
10619
11210
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
10620
11211
          # This is similar to how AIX traditionally builds it's shared libraries.
10621
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
11212
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $compiler_flags $libobjs $deplibs ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
10622
11213
        fi
10623
11214
      fi
10624
11215
      ;;
10641
11232
      # hardcode_libdir_flag_spec is actually meaningless, as there is
10642
11233
      # no search path for DLLs.
10643
11234
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
10644
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
11235
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=no
10645
11236
      # Tell ltmain to make .lib files, not .a files.
10646
11237
      libext=lib
10647
11238
      # Tell ltmain to make .dll files, not .so files.
10648
11239
      shrext=".dll"
10649
11240
      # FIXME: Setting linknames here is a bad hack.
10650
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
11241
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $compiler_flags $libobjs `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
10651
11242
      # The linker will automatically build a .lib file if we build a DLL.
10652
11243
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
10653
11244
      # FIXME: Should let the user specify the lib program.
10661
11252
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
10662
11253
      case "$host_os" in
10663
11254
      rhapsody* | darwin1.[[012]])
10664
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
 
11255
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,suppress'
10665
11256
        ;;
10666
11257
      *) # Darwin 1.3 on
10667
 
        test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
 
11258
        if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
11259
          _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
11260
        else
 
11261
          case ${MACOSX_DEPLOYMENT_TARGET} in
 
11262
            10.[012])
 
11263
              _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-flat_namespace -Wl,-undefined -Wl,suppress'
 
11264
              ;;
 
11265
            10.*)
 
11266
              _LT_AC_TAGVAR(allow_undefined_flag, $1)='-Wl,-undefined -Wl,dynamic_lookup'
 
11267
              ;;
 
11268
          esac
 
11269
        fi
10668
11270
        ;;
10669
11271
      esac
10670
11272
        lt_int_apple_cc_single_mod=no
10673
11275
          lt_int_apple_cc_single_mod=yes
10674
11276
        fi
10675
11277
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10676
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
11278
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring'
10677
11279
        else
10678
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
11280
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring'
10679
11281
      fi
10680
 
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
11282
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $compiler_flags $libobjs $deplibs'
10681
11283
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
10682
11284
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
10683
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
11285
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $compiler_flags $libobjs $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10684
11286
        else
10685
 
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
11287
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $compiler_flags $deplibs -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10686
11288
        fi
10687
 
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
11289
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $compiler_flags $libobjs $deplibs~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
10688
11290
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
10689
11291
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
10690
11292
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
10725
11327
      ;;
10726
11328
 
10727
11329
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
10728
 
    freebsd*)
10729
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
11330
    freebsd* | kfreebsd*-gnu)
 
11331
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $compiler_flags $libobjs $deplibs'
10730
11332
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10731
11333
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10732
11334
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10734
11336
 
10735
11337
    hpux9*)
10736
11338
      if test "$GCC" = yes; then
10737
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
11339
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $compiler_flags $libobjs $deplibs~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10738
11340
      else
10739
11341
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
10740
11342
      fi
10752
11354
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
10753
11355
        case "$host_cpu" in
10754
11356
        hppa*64*|ia64*)
10755
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11357
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
10756
11358
          ;;
10757
11359
        *)
10758
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
11360
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $compiler_flags $libobjs $deplibs'
10759
11361
          ;;
10760
11362
        esac
10761
11363
      else
10802
11404
 
10803
11405
    irix5* | irix6* | nonstopux*)
10804
11406
      if test "$GCC" = yes; then
10805
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
11407
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10806
11408
      else
10807
11409
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
10808
11410
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
10835
11437
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
10836
11438
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
10837
11439
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10838
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
11440
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
10839
11441
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10840
11442
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
10841
11443
      else
10845
11447
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
10846
11448
           ;;
10847
11449
         *)
10848
 
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
11450
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $compiler_flags $libobjs $deplibs'
10849
11451
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
10850
11452
           ;;
10851
11453
       esac
10856
11458
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
10857
11459
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
10858
11460
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
10859
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
11461
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $compiler_flags $libobjs $deplibs$output_objdir/$libname.def'
10860
11462
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
10861
11463
      ;;
10862
11464
 
10863
11465
    osf3*)
10864
11466
      if test "$GCC" = yes; then
10865
11467
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10866
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
11468
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10867
11469
      else
10868
11470
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10869
11471
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
10875
11477
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
10876
11478
      if test "$GCC" = yes; then
10877
11479
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
10878
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
11480
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $compiler_flags $libobjs $deplibs ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
10879
11481
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
10880
11482
      else
10881
11483
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
10900
11502
    solaris*)
10901
11503
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
10902
11504
      if test "$GCC" = yes; then
10903
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11505
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
10904
11506
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10905
 
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
11507
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs~$rm $lib.exp'
10906
11508
      else
10907
11509
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
10908
11510
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
10922
11524
      if test "x$host_vendor" = xsequent; then
10923
11525
        # Use $CC to link under sequent, because it throws in some extra .o
10924
11526
        # files that make .init and .fini sections work.
10925
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
11527
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $compiler_flags $libobjs $deplibs'
10926
11528
      else
10927
11529
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
10928
11530
      fi
10982
11584
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
10983
11585
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
10984
11586
      if test "$GCC" = yes; then
10985
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11587
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
10986
11588
      else
10987
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
11589
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $compiler_flags $libobjs $deplibs'
10988
11590
      fi
10989
11591
      runpath_var='LD_RUN_PATH'
10990
11592
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no