-
Notifications
You must be signed in to change notification settings - Fork 14
/
configure.ac
1753 lines (1578 loc) · 56.3 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
dnl -*- autoconf -*-
dnl
dnl @file configure.ac
dnl @brief Input file for autoconf
dnl @date $Date: 2008-02-26 15:21:04 $
dnl @author Noriaki Ando <n-ando@aist.go.jp>
dnl
dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which tries to guess your system
dnl configuration
dnl
dnl
dnl $Id$
dnl
dnl ------------------------------------------------------------
dnl Autoconf initial macros
dnl ------------------------------------------------------------
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(OpenRTM-aist, 1.2.0, n-ando@aist.go.jp, OpenRTM-aist)
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([dist-bzip2 tar-pax])
AM_CONFIG_HEADER([src/lib/rtm/config_rtc.h])
dnl ------------------------------------------------------------
dnl Config files created at configure
dnl ------------------------------------------------------------
dnl pkgconfig pc file
AC_CONFIG_FILES([utils/rtm-config/openrtm-aist.pc:utils/rtm-config/openrtm-aist.pc.in])
AC_CONFIG_FILES([utils/rtm-config/rtm-config:utils/rtm-config/rtm-config.in])
dnl RPM package spec file and build script
dnl AC_CONFIG_FILES([packages/rpm/OpenRTM-aist.spec:packages/rpm/OpenRTM-aist.spec.in])
dnl AC_CONFIG_FILES([packages/rpm/rpm_build.sh:packages/rpm/rpm_build.sh.in])
dnl ------------------------------------------------------------
dnl rename config header's PACKAGE_* definition
dnl ------------------------------------------------------------
mv src/lib/rtm/config_rtc.h.in src/lib/rtm/config_rtc.h.in.org
sed -e 's/undef PACKAGE/undef RTM_PACKAGE/g' src/lib/rtm/config_rtc.h.in.org | sed -e 's/\#undef VERSION.*//g' > src/lib/rtm/config_rtc.h.in
rm -f src/lib/rtm/config_rtc.h.in.org
AC_CONFIG_SUBDIRS([src/lib/coil])
dnl ------------------------------------------------------------
dnl Version number
dnl ------------------------------------------------------------
major_version=[`echo $VERSION | sed -e 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\1/g'`]
minor_version=[`echo $VERSION | sed -e 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\2/g'`]
revision_num=[`echo $VERSION | sed -e 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\3/g'`]
short_version=$major_version$minor_version$revision_num
RTM_VERSION=$VERSION
RTM_MAJOR_VERSION=$major_version
RTM_MINOR_VERSION=$minor_version
RTM_REVISION_NUM=$revision_num
RTM_SHORT_VERSION=$short_version
RTM_DESCRIPTION='An OMG RTC compliant middleware for robots.'
AC_DEFINE_UNQUOTED([RTM_VERSION], "$VERSION", [RTM version])
AC_DEFINE_UNQUOTED([RTM_MAJOR_VERSION], $major_version, [RTM major version])
AC_DEFINE_UNQUOTED([RTM_MINOR_VERSION], $minor_version, [RTM minor version])
AC_DEFINE_UNQUOTED([RTM_REVISION_NUM], $revision_num, [RTM revision numver])
AC_DEFINE_UNQUOTED([RTM_SHORT_VERSION], "$short_version", [RTM short version])
dnl ------------------------------------------------------------
dnl Basic setup
dnl ------------------------------------------------------------
AC_PROG_CXX
AC_PROG_CXXCPP
AC_LANG_CPLUSPLUS
AC_PROG_INSTALL
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AM_WITH_DMALLOC
AC_CHECK_HEADERS([nlist.h stdlib.h unistd.h])
AC_CHECK_FUNCS([uname])
CPPFLAGS="-Wall -fPIC $CPPFLAGS"
CXXFLAGS="-Wall -fPIC $CXXFLAGS"
AC_SEARCH_LIBS(pthread_create, pthread c_r, ,
AC_MSG_ERROR([** thread library is needed **]))
SHLIB_SUFFIX=".so"
dnl ------------------------------------------------------------
dnl configure arguments definition
dnl ------------------------------------------------------------
dnl ACE directory
AC_ARG_WITH(pkgconfigdir,
AC_HELP_STRING([--with-pkgconfigdir],
[Use the specified pkgconfig dir (default is libdir/pkgconfig]),
[pkgconfigdir=${withval}],
[pkgconfigdir='${libdir}/pkgconfig'])
AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
AC_ARG_WITH(ace-includes, [ --with-ace-includes=dir Find ACE include files installation below dir(without "include")])
AC_ARG_WITH(ace-lib, [ --with-ace-lib=dir Find ACE lib files installation below dir(without "lib"])
dnl boost directory
#AC_ARG_WITH(boost-includes, [ --with-boost-includes=dir Find boost include files installation below dir])
#AC_ARG_WITH(boost-lib, [ --with-boost-lib=dir Find boost lib files installation below dir])
dnl ORB selection
AC_ARG_WITH(mico, [ --with-mico=dir Find MICO installation below dir])
AC_ARG_WITH(orbix, [ --with-orbix=dir Find Orbix installation below dir])
AC_ARG_WITH(orbacus, [ --with-orbacus=dir Find ORBacus installation below dir])
AC_ARG_WITH(tao, [ --with-tao=dir Find TAO installation below dir])
AC_ARG_WITH(omniorb, [ --with-omniorb=dir Find omniORB installation below dir])
AC_ARG_WITH(orbit2, [ --with-orbit2=dir Find ORBit2 installation below dir])
AC_ARG_WITH(orbexpress, [ --with-orbexpress=dir Find ORBexpress installation below dir])
AC_ARG_WITH(rtorb, [ --with-rtorb=dir Find RtORB installation below dir])
AC_ARG_WITH(generic-orb, [ --with-generic-orb Use other CORBA 2.3 ORB])
AC_ARG_WITH(generic-orb-lib, [ --with-generic-orb-lib =libs ORB libraries (-l...)])
AC_ARG_WITH(doxygen, [ --without-doxygen Don't create documentation by doxygen])
dnl Script wrapper selection
#AC_ARG_WITH(python, [ --with-python=dir Find Python installation below dir])
#AC_ARG_WITH(ruby, [ --with-ruby=dir Find Ruby installation below dir])
#AC_ARG_WITH(perl, [ --with-perl=dir Find Perl installation below dir])
#AC_ARG_WITH(tcl, [ --with-tcl=dir Find Tcl installation below dir])
#AC_ARG_WITH(euslisp, [ --with-euslisp=dir Find EusLisp installation below dir])
dnl Additional compile options
AC_ARG_ENABLE(debug, [ --enable-debug Compile using -g])
AC_ARG_ENABLE(optimize, [ --disable-optimize Don't compile using -O])
AC_ARG_WITH(includes, [ --with-includes=dirs Additional include dirs (separated by ':')])
AC_ARG_WITH(libs, [ --with-libs=dirs Additional lib dirs (separated by ':')])
AC_ARG_ENABLE(gcc2option, [ --with-gcc2 Compile with gcc2])
AC_ARG_ENABLE(artlinux, [ --with-artlinux With ART-Linux])
AC_ARG_ENABLE(sockdataport, [ --with-sockdataport With Socket DataPort])
AC_ARG_ENABLE(unittest, [ --enable-test Enable UnitTest With CppUnit])
dnl ------------------------------------------------------------
dnl Determine system name
dnl ------------------------------------------------------------
AC_MSG_CHECKING([system name])
system=`uname -s`-`uname -r`
if test "`uname -s`" = "AIX" ; then
system=AIX-`uname -v`.`uname -r`
fi
case $system in
[FreeBSD*)]
AC_DEFINE([RTM_OS_FREEBSD], [TRUE], [OS is FreeBSD])
LDFLAGS="-export-dynamic $LDFLAGS"
os="freebsd"
;;
[Linux*)]
AC_DEFINE([RTM_OS_LINUX], [TRUE], [OS is Linux])
AC_DEFINE([_REENTRANT], [TRUE], [Multi Thread Support])
LDFLAGS="-luuid -lrt -ldl -export-dynamic $LDFLAGS"
os="linux"
;;
[HP-UX*)]
AC_DEFINE([RTM_OS_HPUX], [TRUE], [OS is HP-UX])
os="hp-ux"
;;
[SunOS*)]
AC_DEFINE([RTM_OS_SUNOS], [TRUE], [OS is SunOS])
os="sunos"
;;
[IRIX*)]
AC_DEFINE([RTM_OS_IRIX], [TRUE], [OS is IRIX])
os="irix"
;;
[OSF1*)]
AC_DEFINE([RTM_OS_OSF1], [TRUE], [OS is OSF1])
os="osf1"
;;
[Darwin*)]
AC_DEFINE([RTM_OS_DARWIN], [TRUE], [OS is Max OS X])
SHLIB_SUFFIX=".dylib"
LDFLAGS="-export-dynamic $LDFLAGS"
os="darwin"
;;
[QNX*)]
AC_DEFINE([RTM_OS_QNX], [TRUE], [OS is QNX])
os="qnx"
;;
[CYGWIN*)]
AC_DEFINE([RTM_OS_CYGWIN], [TRUE], [OS is Cygwin])
os="cygwin"
CPPFLAGS="-DCygwin $CPPFLAGS"
CXXFLAGS="-DCygwin $CXXFLAGS"
LDFLAGS="-no-undefined -luuid -lrt -ldl -export-dynamic $LDFLAGS"
;;
*)
echo "Unkonown system"
;;
esac
AC_MSG_RESULT($system)
AC_MSG_CHECKING(compiler flags)
[CXXFLAGS=`echo $CXXFLAGS | sed 's/-g //g' | sed 's/-O[0-9]*//g'`]
if test "x$enable_debug" = "xyes" ; then
CXXFLAGS="$CXXFLAGS -g"
elif test "x$enable_optimize" != "xno" ; then
CXXFLAGS="$CXXFLAGS -O2"
fi
if test "x$CXXFLAGS" = "x" ; then
AC_MSG_RESULT(none)
else
AC_MSG_RESULT($CXXFLAGS)
fi
if test "x$with_gcc2" = "xyes" ; then
CXXFLAGS="$CXXFLAGS -ftemplate-depth-30"
AC_DEFINE([RTM_GCC2], [TRUE], [RTM is compiled with gcc2])
fi
dnl ------------------------------------------------------------
dnl Prepare for setup
dnl ------------------------------------------------------------
orb_to_use=
more_incs="`echo $with_includes | sed 's/:/ /g'`"
more_libs="`echo $with_libs | sed 's/:/ /g'`"
base_incs="`echo $CPLUS_INCLUDE_PATH | sed 's/:/ /g'` /local/include /usr/local/include /usr/include"
base_libs="`echo $LIBPATH $LIBRARY_PATH $LD_LIBRARY_PATH $SHLIB_PATH | sed 's/:/ /g'` /usr/local/lib /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu"
base_bins="`echo $PATH | sed 's/:/\/.. /g'` /local/bin /usr/local/bin /usr/bin"
base_dirs="$prefix `echo $PATH | sed 's/:/\/.. /g'`"
dnl ------------------------------------------------------------
dnl Use with_includes and with_libs
dnl ------------------------------------------------------------
for ipath in $more_incs ; do
CPPFLAGS="-I$ipath $CPPFLAGS"
CXXFLAGS="-I$ipath $CXXFLAGS"
done
for lpath in $more_libs ; do
LDFLAGS="-L$lpath $LDFLAGS"
done
dnl this is needed for creating libraries using libtool
dnl AC_LIBTOOL_WIN32_DLL
dnl AC_LIBLTDL_CONVENIENCE
dnl AC_LIBLTDL_INSTALLABLE
dnl AC_LIBTOOL_DLOPEN
dnl AC_CONFIG_SUBDIRS(libltdl)
dnl AC_LIB_LTDL
dnl AC_SUBST(INCLTDL)
dnl AC_SUBST(LIBLTDL)
dnl Checks for libraries.
dnl FIXME: Replace `main' with a function in `-le':
dnl AC_CHECK_LIB([e], [main])
dnl FIXME: Replace `main' with a function in `-links':
dnl AC_CHECK_LIB([inks], [main])
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
dnl AC_C_CONST
dnl AC_TYPE_PID_T
dnl AC_STRUCT_TM
dnl Checks for library functions.
dnl AC_FUNC_ERROR_AT_LINE
dnl ============================================================
dnl Check Doxygen setup
dnl
dnl 1. check if doxygen installed
dnl 2. set DOCS variable
dnl ============================================================
dnl ------------------------------------------------------------
dnl Find doxygen
dnl ------------------------------------------------------------
DOCS="docs"
if test "x$with_doxygen" = "xno" ; then
DOCS=""
else
AC_MSG_CHECKING(for doxygen)
FP_FIND_FILE(doxygen,$base_bins $base_dirs,bin)
if test "x$doxygen" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please install doxygen or use --without-doxygen option)
else
AC_MSG_RESULT($doxygen)
fi
DOCS="docs"
fi
dnl ============================================================
dnl Check boost setup
dnl
dnl 1. check boost/version.hpp for Boost
dnl 2. check Boost version from boost/version.hpp
dnl 3. check libboost_regex.so
dnl ============================================================
dnl ------------------------------------------------------------
dnl Find boost/version.hpp
dnl ------------------------------------------------------------
dnl AC_MSG_CHECKING(for boost/version.hpp)
dnl FP_FIND_FILE(boost/version.hpp,
dnl $with_boost_includes $more_incs $base_incs $base_dirs,
dnl include cxx/include)
dnl if test "x$boost_version_hpp_dir" = "x" ; then
dnl AC_MSG_RESULT(Boost (boost/version.hpp) not found)
dnl AC_MSG_ERROR(
dnl use --with-boost-includes=<dir> to locate Boost's headers.
dnl hint: <dir>/( include cxx/include ) will be searched.)
dnl # Error exit!!
dnl else
dnl AC_MSG_RESULT(found in $boost_version_hpp_dir)
dnl have_boost=yes
dnl fi
dnl
dnl ------------------------------------------------------------
dnl Check boost version/Find libboost_regex.so
dnl ------------------------------------------------------------
dnl if test "x$have_boost" = "xyes" ; then
dnl AC_MSG_CHECKING(Boost version)
dnl boost_version=[`grep ' BOOST_VERSION ' $boost_version_hpp_dir/boost/version.hpp | grep '#define' | cut -d ' ' -f 3`]
dnl
dnl case $boost_version in
dnl [1?????)]
dnl ;;
dnl *)
dnl AC_MSG_WARN([Unknown Boost version number, expecting 1.3.0 or above.])
dnl esac
dnl AC_MSG_RESULT($boost_version)
dnl
dnl # Checking libboost_regex.so
dnl AC_MSG_CHECKING(for libboost_regex.so)
dnl FP_FIND_FILE(libboost_regex.so,
dnl $with_boost_lib $more_libs $base_libs $base_dirs,
dnl lib cxx/lib)
dnl if test "x$libboost_regex_so_dir" = "x" ; then
dnl AC_MSG_RESULT(not found)
dnl AC_MSG_ERROR(
dnl use --with-boost-lib=<dir> to locate libboost_regex.so
dnl hint: <dir>/( lib cxx/lib ) will be searched.)
dnl # Error exit!!
dnl else
dnl AC_MSG_RESULT(found in $libboost_regex_so_dir)
dnl fi
dnl
dnl #
dnl # Boost setup complete
dnl #
dnl # Compiler/Linker options
dnl CPPFLAGS="$CPPFLAGS -I$boost_version_hpp_dir"
dnl CXXFLAGS="$CXXFLAGS -I$boost_version_hpp_dir"
dnl LDFLAGS="$LDFLAGS -L$libboost_regex_so_dir "
dnl LIBS="$LIBS -lboost_regex"
dnl LDSOLIBS="$LDSOLIBS -lboost_regex"
dnl AC_DEFINE([WITH_BOOST], [TRUE], [compiled with Boost])
dnl fi
dnl ============================================================
dnl ORB configuration
dnl
dnl ============================================================
if test "x$with_mico" != "x" ; then
orb_to_use=MICO
fi
if test "x$with_orbix" != "x" ; then
orb_to_use=Orbix
fi
if test "x$with_orbacus" != "x" ; then
orb_to_use=ORBacus
fi
if test "x$with_omniorb" != "x" ; then
orb_to_use=omniORB
fi
if test "x$with_tao" != "x" ; then
orb_to_use=TAO
fi
if test "x$with_orbit2" != "x" ; then
orb_to_use=ORBit2
fi
if test "x$with_orbexpress" != "x" ; then
orb_to_use=ORBexpress
fi
if test "x$with_rtorb" != "x" ; then
orb_to_use=RtORB
fi
if test "x$orb_to_use" = "x" ; then
orb_to_use=omniORB
fi
echo 'ORB: '$orb_to_use
echo 'OpenRTM-aist will be compiled with '$orb_to_use
dnl ============================================================
dnl Check Mico setup
dnl
dnl 1. check mico-setup.sh getting MICO setup information
dnl 2. obtain some VARIABLES from mico-setup.sh
dnl 3. set IDL compile options, CPPFLAGS, LDFLAGS, LIBS etc...
dnl ============================================================
have_mico=no
if test "x$orb_to_use" = "xMICO" ; then
dnl ------------------------------------------------------------
dnl Find mico-setup.sh
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for mico-setup.sh)
if test "x$MICOVERSION" != "x" && test "x$MICODIR" != "x" ; then
AC_MSG_RESULT(already loaded)
have_mico=yes
else
FP_FIND_FILE(mico-setup.sh,
$with_mico $more_libs $base_libs $base_dirs,
lib)
if test "x$mico_setup_sh" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
use --with-mico=<dir> to locate MICO setup directories.
hint: <dir>/lib will be searched.)
# Error exit!!
else
AC_MSG_RESULT($mico_setup_sh)
AC_MSG_CHECKING(contents of MICO config)
#
# mico_config unsets prefix and exec_prefix
#
save_prefix="$prefix"
save_exec_prefix="$exec_prefix"
. $mico_setup_sh
prefix="$save_prefix"
exec_prefix="$save_exec_prefix"
AC_MSG_RESULT(done)
have_mico=yes
fi
fi
fi
dnl ------------------------------------------------------------
dnl Check mico version
dnl ------------------------------------------------------------
if test "x$have_mico" = "xyes" ; then
AC_MSG_CHECKING(MICO version)
AC_MSG_RESULT($MICOVERSION)
case $MICOVERSION in
[2.[012].*|2.3.[0123])]
AC_MSG_WARN([MICO version unusable, need at least 2.3.4])
have_mico=no
;;
[2.[3-9].*)]
;;
*)
AC_MSG_WARN([Unknown MICO version number, expecting 2.3.0 or above.])
AC_MSG_WARN([If it doesn't work, use --disable-mico])
;;
esac
fi
dnl ------------------------------------------------------------
dnl Check CORBA.h path, libmico.so
dnl ------------------------------------------------------------
if test "x$have_mico" = "xyes" ; then
AC_MSG_CHECKING(for CORBA.h)
FP_FIND_FILE(CORBA.h,
$MICODIR $MICOSHARED $with_mico $more_incs $base_incs $base_dirs,
include cxx/include)
if test "x$CORBA_h_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
use --with-mico=<dir> to locate mico's CORBA.h
hint: <dir>/( include cxx/include ) will be searched.)
# Error exit!!
else
AC_MSG_RESULT(found in $CORBA_h_dir)
fi
dnl ------------------------------------------------------------
dnl Check libmico.so
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for libmico${MICOVERSION}${SHLIB_SUFFIX})
FP_FIND_FILE(libmico${MICOVERSION}${SHLIB_SUFFIX},
$MICODIR $MICOSHAREDDIR $with_mico $more_libs $base_libs $base_dirs,
lib, mico_lib)
if test "x$mico_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_CHECKING(for libmico${MICOVERSION}.a)
FP_FIND_FILE(libmico${MICOVERSION}.a,
$MICODIR MICOSHAREDDIR $with_mico $more_libs $base_libs $base_dirs,
lib, mico_lib)
fi
if test "x$mico_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
use --with-mico=<dir> to locate libmico${MICOVERSION}.so or libmico${MICOVERSION}.a
hint: <dir>/lib will be searched.)
# Error exit!!
else
AC_MSG_RESULT(found in $mico_lib_dir)
fi
dnl ------------------------------------------------------------
dnl Check whether we must use MiniSTL
dnl ------------------------------------------------------------
AC_MSG_CHECKING(whether we must use MiniSTL)
cat > conftest.c <<EOF
#include <CORBA.h>
#ifdef HAVE_MINI_STL
MiniSTL:yes
#else
MiniSTL:no
#endif
EOF
have_mini_stl=[`${CXX-c++} -I$CORBA_h_dir -E conftest.c 2> /dev/null | grep '^MiniSTL' | cut -d: -f 2`]
rm -f conftest.*
if test "x$have_mini_stl" != "xyes" && test "x$have_mini_stl" != "xno" ; then
have_mini_stl=unknown
fi
AC_MSG_RESULT($have_mini_stl)
if test "x$have_mini_stl" = "xyes" ; then
CPPFLAGS="-I$CORBA_h_dir/ministl $CPPFLAGS"
fi
dnl ------------------------------------------------------------
dnl Check mico-ld
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for miFPco-ld)
FP_FIND_FILE(mico-ld,
$MICODIR $MICOSHAREDDIR $with_mico $base_bins $base_dirs,
bin)
if test "x$mico_ld" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
use --with-mico=<dir> to locate mico-ld.
hint: <dir>/bin will be searched.)
# Error exit!!
else
AC_MSG_RESULT($mico_ld)
fi
dnl ------------------------------------------------------------
dnl Check MICO dependencies
dnl ------------------------------------------------------------
AC_MSG_CHECKING(MICO dependencies)
micodeps=
for item in `grep -- -l $mico_ld | tr '"' ' '` ; do # "
case $item in
-l*) micodeps="$micodeps $item" ;;
esac
done
AC_MSG_RESULT($micodeps)
dnl ------------------------------------------------------------
dnl Check MICO idl
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for idl)
FP_FIND_FILE(idl,
$MICODIR $MICOSHAREDDIR $with_mico $base_bins $base_dirs,
bin)
if test "x$idl" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(
use --with-mico=<dir> to locate idl.
hint: <dir>/bin will be searched.)
# Error exit!!
else
AC_MSG_RESULT($idl)
fi
dnl ------------------------------------------------------------
dnl Mico setup complete
dnl ------------------------------------------------------------
PATH_NORM($idl)
IDLC=$n_path
IDL_FLAGS="--c++-skel --poa --no-boa --any"
CXXFLAGS="-I$CORBA_h_dir $CXXFLAGS"
LDFLAGS="$LDFLAGS -L$mico_lib_dir"
LIBS="$LIBS -lmico$MICOVERSION -lmicocoss$MICOVERSION $micodeps"
LDSOLIBS="$LDSOLIBS -lmico$MICOVERSION -lmicocoss$MICOVERSION $micodeps"
if test "x$micoir_lib_dir" != "x" ; then
LIBS="-lmicoir$MICOVERSION -lmicocoss$MICOVERSION $LIBS"
LDSOLIBS="-lmicoir$MICOVERSION $LDSOLIBS"
fi
AC_DEFINE([ORB_IS_MICO], [TRUE], [ORB is MICO])
fi
if test "x$orb_to_use" = "x" && test "x$have_mico" = "xyes" ; then
orb_to_use=MICO
fi
dnl end of mico test
dnl ------------------------------------------------------------
dnl ============================================================
dnl Check ORBacus setup
dnl
dnl 1. check OB/CORBA.h for ORBacus
dnl 2. check ORBacus version
dnl 3. check ORBacus library "libOB.so, libJTC.so"
dnl 4. check ORBacus idl compiler
dnl 5. check ORBacus irserv
dnl 4. set IDL compile options, CPPFLAGS, LDFLAGS, LIBS etc...
dnl ============================================================
have_orbacus=no
if test "x$orb_to_use" = "xORBacus" ; then
AC_MSG_CHECKING(for OB/CORBA.h)
FP_FIND_FILE(OB/CORBA.h,$with_orbacus $more_incs $base_incs $base_dirs,include)
if test "x$OB_CORBA_h_dir" = "x" ; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT(found in $OB_CORBA_h_dir)
have_orbacus=yes
fi
fi
if test "x$have_orbacus" = "xyes" ; then
AC_MSG_CHECKING(ORBacus version)
cat > conftest.c <<EOF
#include <OB/CORBA.h>
version:OB_VERSION
EOF
ob_version=[`${CXX-c++} -I$OB_CORBA_h_dir -E conftest.c 2> /dev/null | grep ^version | cut -d: -f 2 | sed 's/[" ]//g'`]
# "
rm -f conftest.*
if test "x$ob_version" = "x" ; then
ob_version=unknown
fi
AC_MSG_RESULT($ob_version)
case $ob_version in
3*|4.0a|4.0b1|4.0b2*)
AC_MSG_WARN([ORBacus $ob_version unusable, need at least 4.0b3])
have_orbacus=no
;;
4.0b*|4.0|4.0.*)
;;
4.1|4.1.*)
;;
*)
AC_MSG_WARN([Unknown ORBacus version number, expecting 4.0b3 or above.])
AC_MSG_WARN([If it doesn't work, use --disable-orbacus])
;;
esac
fi
if test "x$have_orbacus" = "xyes" ; then
AC_MSG_CHECKING(for libOB.so)
FP_FIND_FILE(libOB.so,$with_orbacus $more_libs $base_libs $base_dirs,lib,ob_lib)
if test "x$ob_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_CHECKING(for libOB.a)
FP_FIND_FILE(libOB.a,$with_orbacus $more_libs $base_libs $base_dirs,lib,ob_lib)
fi
if test "x$ob_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-orbacus to locate libOB.so or libOB.a)
else
AC_MSG_RESULT(found in $ob_lib_dir)
fi
AC_MSG_CHECKING(for libJTC.so)
FP_FIND_FILE(libJTC.so,$with_orbacus $more_libs $base_libs $base_dirs,lib,ob_jtc_lib)
if test "x$ob_jtc_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_CHECKING(for libJTC.a)
FP_FIND_FILE(libJTC.a,$with_orbacus $more_libs $base_libs $base_dirs,lib,ob_jtc_lib)
fi
if test "x$ob_jtc_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
case $ob_version in
4.0*)
AC_MSG_WARN(assuming single-threaded ORBacus)
;;
4.1|4.1.*)
AC_MSG_ERROR(use --with-orbacus to locate libJTC.so or libJTC.a)
;;
esac
else
AC_MSG_RESULT(found in $ob_jtc_lib_dir)
fi
if test "x$enable_orbacus_repo" != "xno" ; then
AC_MSG_RESULT(enable_orbacus_repo)
# AC_DEFINE(COMBAT_ORBACUS_LOCAL_REPO)
fi
AC_MSG_CHECKING(for idl)
FP_FIND_FILE(idl,$with_orbacus $base_bins $base_dirs,bin)
if test "x$idl" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-orbacus to locate idl)
else
AC_MSG_RESULT($idl)
fi
dnl ------------------------------------------------------------
dnl ORBacus setup complete
dnl ------------------------------------------------------------
PATH_NORM($idl)
IDLC = $n_path
IDL_FLAGS="--c-suffix .cc"
IFRFEED="$irfeed"
IFRSERVER="$irserv"
# Compiler/Linker options
# CPPFLAGS="$CPPFLAGS -I$OB_CORBA_h_dir"
CXXFLAGS="-I$OB_CORBA_h_dir $CXXFLAGS"
LDFLAGS="-L$ob_lib_dir $LDFLAGS"
if test "x$ob_jtc_lib_dir" != "x" ; then
LIBS=" $LIBS -lJTC"
LDSOLIBS="$LIBS -lJTC"
fi
LIBS="$LIBS -lOB"
LDSOLIBS="$LDSOLIBS -lOB"
AC_DEFINE([ORB_IS_ORBACUS], [TRUE], [ORB is ORBacus])
fi
if test "x$orb_to_use" = "x" && test "x$have_orbacus" = "xyes" ; then
orb_to_use=ORBacus
fi
dnl end of ORBacus setup
dnl ------------------------------------------------------------
dnl ------------------------------------------------------------
dnl Check Orbix/E setup
dnl
dnl 1. check CORBA.hh for Orbix
dnl 2. check Orbix library "libit_art.so"
dnl 3. check Orbix version using "idl"
dnl 4. set IDL compile options, CPPFLAGS, LDFLAGS, LIBS etc...
dnl ------------------------------------------------------------
have_orbix=no
if test "x$orb_to_use" = "xOrbix" ; then
dnl ------------------------------------------------------------
dnl find Orbix/E's corba.hh
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for OBE/CORBA.h)
# orbix/corba.hh -> $orbix_corba_hh, $orbix_corba_hh_dir
FP_FIND_FILE(OBE/CORBA.h,
$with_orbix $ART_INSTALL_PATH $more_incs $base_incs $base_dirs,
include cxx/include)
if test "x$obe_corba_h_dir" = "x" ; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT(found in $obe_corba_h_dir)
have_orbix=yes
fi
fi
if test "x$have_orbix" = "xyes" ; then
dnl ------------------------------------------------------------
dnl Find libit_art.so
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for libobea_server.so)
FP_FIND_FILE(libobea_server.so,$with_orbix $ART_INSTALL_PATH $more_libs $base_libs $base_dirs,lib cxx/lib)
if test "x$libobea_server_so_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-orbix to locate libit_art.so)
else
AC_MSG_RESULT(found in $libobea_server_so_dir)
fi
dnl ------------------------------------------------------------
dnl Find idl
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for aeidl)
FP_FIND_FILE(aeidl,$with_orbix $ART_INSTALL_PATH $base_bins $base_dirs,bin)
if test "x$aeidl" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-orbix to locate idl)
else
AC_MSG_RESULT($aeidl)
fi
dnl ------------------------------------------------------------
dnl Find enameserv
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for enameserv)
FP_FIND_FILE(idl,$with_orbix $ART_INSTALL_PATH $base_bins $base_dirs,bin)
if test "x$idl" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-orbix to locate idl)
else
AC_MSG_RESULT($enameserv)
fi
dnl ------------------------------------------------------------
dnl Check Orbix/E's version
dnl ------------------------------------------------------------
AC_MSG_CHECKING(OrbixE version)
orbix_version=[`$idl -V 2>&1 | grep Version | sed 's/^.*Version //'`]
if test "x$orbix_version" = "x" ; then
orbix_version=unknown
fi
AC_MSG_RESULT($orbix_version)
dnl ------------------------------------------------------------
dnl Orbix/E setup complete
dnl ------------------------------------------------------------
PATH_NORM($aeidl)
IDLC = $n_path
IDL_FLAGS="-base:-ccc:-hh -poa:-ccc:-hh"
COSNAMES = $enameserv
dnl Compiler/Linker options
dnl CPPFLAGS="$CPPFLAGS -D_REENTRANT -I$orbix_corba_hh_dir"
CXXFLAGS="-D_REENTRANT -I$orbix_corba_hh_dir $CXXFLAGS"
LDFLAGS="$LDFLAGS -L$libit_art_so_dir"
LIBS="$LIBS -lit_dynany -lit_poa -lit_art -lit_itl -lit_ts -lit_base -lpthread"
LDSOLIBS="$LDSOLIBS -lit_dynany -lit_poa -lit_art -lit_itl -lit_ts -lit_base -lpthread"
AC_DEFINE([ORB_IS_ORBIX], [TRUE], [ORB is Orbix])
fi
if test "x$orb_to_use" = "x" && test "x$have_orbix" = "xyes" ; then
orb_to_use=OrbixE
fi
dnl ============================================================
dnl TAO setup
dnl
dnl 1. check tao/corba.h for TAO
dnl 2. check TAO library "libTAO.so"
dnl 3. check TAO idl compiler "tao_idl"
dnl 4. check TAO version using tao_idl
dnl 5. set IDL compile options, CPPFLAGS, LDFLAGS, LIBS etc...
dnl ============================================================
have_tao=no
if test "x$orb_to_use" = "xTAO" ; then
dnl ------------------------------------------------------------
dnl find TAO's corba.h
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for tao/corba.h)
dnl tao/corba.h -> $tao_corba_h, $tao_corba_h_dir
FP_FIND_FILE(tao/corba.h,
$with_tao $TAO_ROOT $ACE_ROOT/tao/include $more_incs $base_incs $base_dirs,
include cxx/include)
if test "x$tao_corba_h_dir" = "x" ; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT(found in $tao_corba_h_dir)
tao_include="-I$tao_corba_h_dir"
have_tao=yes
fi
fi
if test "x$have_tao" = "xyes" ; then
dnl ------------------------------------------------------------
dnl Find libTAO.so
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for libTAO.so)
dnl libTAO.so -> %libTAO_so $libTAO_so_dir
FP_FIND_FILE(libTAO.so,$with_tao $more_libs $base_libs $base_dirs,lib cxx/lib)
if test "x$libTAO_so_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-tao to locate libTAO.so)
else
AC_MSG_RESULT(found in $libTAO_so_dir)
fi
dnl ------------------------------------------------------------
dnl Find tao_idl
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for tao_idl)
dnl tao_idl -> $tao_idl $tao_idl_dir
FP_FIND_FILE(tao_idl,$with_tao $base_bins $base_dirs,bin)
if test "x$tao_idl" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-tao to locate tao_idl)
else
AC_MSG_RESULT($tao_idl)
fi
dnl ------------------------------------------------------------
dnl Find TAO's Naming_Service
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for Naming_Service)
dnl tao_naming_service -> $tao_naming_service $tao_naming_service_dir
FP_FIND_FILE(Naming_Service,$with_tao $base_bins $base_dirs,bin)
if test "x$Naming_Service" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-tao to locate tao_idl)
else
AC_MSG_RESULT($Naming_Service)
fi
dnl ------------------------------------------------------------
dnl Check TAO's version
dnl ------------------------------------------------------------
AC_MSG_CHECKING(TAO version)
tao_version=[`$tao_idl -V 2>&1 | grep 'TAO' | grep 'version' | sed 's/^.*version //'`]
if test "x$tao_version" = "x" ; then
tao_version=unknown
fi
AC_DEFINE([RTC_CORBA_CXXMAPPING11], [TRUE], [CORBA C++ mapping is ver1.1])
AC_MSG_RESULT($tao_version)
dnl ------------------------------------------------------------
dnl TAO setup complete
dnl ------------------------------------------------------------
PATH_NORM($tao_idl)
IDLC=$n_path
IDL_FLAGS="-DTAO_IDL -Ge 0 $tao_include/tao $tao_include"
COSNAMES=$Naming_Service
CPPFLAGS="$tao_include $CPPFLAGS"
CXXFLAGS="$tao_include $CXXFLAGS"
LDFLAGS="-L$libTAO_so_dir $LDFLAGS"
LIBS="-lTAO -lTAO_CosNaming -lTAO_DynamicAny -lTAO_DynamicInterface $LIBS "
LDSOLIBS="-lTAO -lTAO_CosNaming -lTAO_DynamicAny -lTAO_DynamicInterface $LDSOLIBS"
AC_DEFINE([ORB_IS_TAO], [TRUE], [ORB is TAO])
fi
if test "x$orb_to_use" = "x" && test "x$have_tao" = "xyes" ; then
orb_to_use=TAO
fi
dnl end of TAO setup
dnl ------------------------------------------------------------
dnl ============================================================
dnl omniORB setup
dnl
dnl 1. check omniORB4/CORBA.h for omniORB
dnl 2. check omniORB library "libomniORB4.so"
dnl 3. check omniORB idl compiler "omniidl"
dnl 4. check omniORB version using libomniORB4.so
dnl 5. set IDL compile options, CPPFLAGS, LDFLAGS, LIBS etc...
dnl ============================================================
have_omniorb=no
if test "x$orb_to_use" = "xomniORB" ; then
dnl ------------------------------------------------------------
dnl find omniORB's CORBA.h
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for omniORB4/CORBA.h)
dnl omniORB/CORBA.h -> $omniORB4_CORBA_h, $omniORB4_CORBA_h_dir
FP_FIND_FILE(omniORB4/CORBA.h,
$with_omniorb/include $more_incs $base_incs $base_dirs,
include cxx/include)
if test "x$omniORB4_CORBA_h_dir" = "x" ; then
AC_MSG_RESULT(not found)
else
AC_MSG_RESULT(found in $omniORB4_CORBA_h_dir)
have_omniorb=yes
fi
fi
if test "x$have_omniorb" = "xyes" ; then
dnl ------------------------------------------------------------
dnl Find libomniORB4.so
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for libomniORB4.so)
dnl libomniORB4.so -> %libomniORB4_so $libomniORB4_so_dir
FP_FIND_FILE(libomniORB4${SHLIB_SUFFIX},$with_omniorb/lib $more_libs $base_libs $base_dirs,lib cxx/lib, omniorb_lib)
if test "x$omniorb_lib_dir" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-omniorb to locate libomniORB4.so)
else
AC_MSG_RESULT(found in $omniorb_lib_dir)
fi
dnl ------------------------------------------------------------
dnl Find omniidl
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for omniidl)
dnl omniidl -> $omniidl $omniidl_dir
FP_FIND_FILE(omniidl,$with_omniorb/bin $base_bins $base_dirs,bin)
if test "x$omniidl" = "x" ; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(use --with-omniorb to locate omniidl)
else
AC_MSG_RESULT($omniidl)
fi
dnl ------------------------------------------------------------
dnl Find omniNames
dnl ------------------------------------------------------------
AC_MSG_CHECKING(for omniNames)
dnl omninames -> $omninames $omninames_dir