-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·1007 lines (837 loc) · 23.6 KB
/
configure
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
#!/bin/sh
#set -x
#//%LICENSE////////////////////////////////////////////////////////////////
#//
#// Licensed to The Open Group (TOG) under one or more contributor license
#// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
#// this work for additional information regarding copyright ownership.
#// Each contributor licenses this file to you under the OpenPegasus Open
#// Source License; you may not use this file except in compliance with the
#// License.
#//
#// Permission is hereby granted, free of charge, to any person obtaining a
#// copy of this software and associated documentation files (the "Software"),
#// to deal in the Software without restriction, including without limitation
#// the rights to use, copy, modify, merge, publish, distribute, sublicense,
#// and/or sell copies of the Software, and to permit persons to whom the
#// Software is furnished to do so, subject to the following conditions:
#//
#// The above copyright notice and this permission notice shall be included
#// in all copies or substantial portions of the Software.
#//
#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#//
#//////////////////////////////////////////////////////////////////////////
##==============================================================================
##
## Check for existence of pegasus config.mak. If this does not exist, it means
## that the distribution is incomplete or that the configure file has been run
## from the wrong directory.
##
##==============================================================================
tiny=0
prefix=""
test_option=0
disable_tests=0
disable_tests=0
interop_name=""
enable_pertinst=0
dis_wsman=0
config=mak/config.mak
echo ===================
echo WARNING: This script is experimental and has known problems. Please
echo use it at your own risk and review the results carefully in the \
echo options.mak file that it creates. Until this script is completed
echo the traditional OpenPegasus build configuration through environment
echo variables will remain in place and is the prefered setup tool
echo ===================
if [ ! -f "$config" ]; then
echo "$0: Error: ./configure must be run from root of Pegasus distribution."
echo
exit 1
fi
##==============================================================================
##
## Collection command line options.
##
##==============================================================================
help=
for opt
do
optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
case $opt in
-h | --help)
help=1
;;
--prefix=*)
prefix=$optarg
;;
--test)
test_option=1
;;
--tiny)
tiny=1
disable_trace=1
disable_tests=1
interop_name=interop
enable_perinst=1
;;
--flavor=*)
flavor=$optarg
;;
--disable-wsman)
dis_wsman=1
;;
*)
echo "$0: unknown option: $opt"
exit 1
;;
esac
done
##==============================================================================
##
## Print help message if --help given on command line.
##
##==============================================================================
if [ "$help" = "1" ]; then
cat<<END
Usage: ./configure [OPTION]...
Configures OpenPegasus build options.
WARNING: This script is experimental and has known problems. Please
use it at your own risk and review the results carefully in the
options.mak file that it creates.Until this script is completed
the traditional OpenPegasus build configuration through environment
variables will remain in place and is the prefered setup tool
Configure examples.
$ ./configure
$ make
Options:
--help
Print this help message.
--prefix=DIR
Install under DIR
--test
Build with test options included.
--tiny
Build tiny version of pegasus with support to SSL,SLP,ICU and
PAM all disabled.
--flavor
Building pegasus with the given flavor tag.
END
fi
##==============================================================================
##
## Guess the platform.
##
##==============================================================================
if [ "$help" != "1" ]; then
if [ -z "$platform" ]; then
machine=`(uname -m) 2>/dev/null` || machine=unknown
system=`(uname -s) 2>/dev/null` || system=unknown
token="$machine:$system"
case "$token" in
i686:Linux)
platform=LINUX_IX86_GNU
libbase=lib
;;
x86_64:Linux)
platform=LINUX_X86_64_GNU
libbase=lib64
;;
sun*:SunOS)
platform=SOLARIS_SPARC_64_CC
libbase=lib/64
;;
i86pc:SunOS)
platform=SOLARIS_X86_64_CC
libbase=lib/64
;;
ia64:HP-UX)
platform=HPUX_IA64_ACC
libbase=lib/64
;;
9000/800:HP-UX)
platform=HPUX_PARISC_ACC
libbase=lib
;;
ia64:Linux)
platform=LINUX_IA64_GNU
libbase=lib/64
;;
ppc:Linux)
platform=LINUX_PPC_GNU
libbase=lib
;;
ppc64:Linux)
platform=LINUX_PPC64_GNU
libbase=lib/64
;;
s390x:Linux)
platform=LINUX_ZSERIES64_GNU
libbase=lib/64
;;
s390:Linux)
platform=LINUX_ZSERIES_GNU
libbase=lib/64
;;
*)
unresolved=1
;;
esac
if [ "unresolved" = "1" ]; then
Machine=`(Uname -m) 2>/dev/null`||Machine=unknown
System=`(Uname -s) 2>/dev/null`||System=unknown
Token="$Machine:$System"
case "$Token" in
alpha:VMS)
platform=VMS_ALPHA_DECCXX
libbase=lib
;;
IA64:OpenVMS)
platform=VMS_IA64_DECCXX
libbase=lib/64
;;
*)
echo "$0: Failed to guess platform"
echo " machine=$machine"
echo " system=$system"
exit 1
;;
esac
fi
fi
##==============================================================================
##
## Resolve default directory names.
##
##==============================================================================
# --prefix:
if [ -z "$prefix" ]; then
prefix=`pwd`
fi
# --bindir:
if [ -z "$bindir" ]; then
bindir=$prefix/bin
fi
# --sbindir:
if [ -z "$sbindir" ]; then
sbindir=$prefix/sbin
fi
# --libdir:
if [ -z "$libdir" ]; then
libdir=$prefix/$libbase
fi
# --includedir:
if [ -z "$includedir" ]; then
includedir=$prefix/include
fi
if [ -z "$with_pam" ]; then
with_pam=/etc/pam.d
fi
##=============================================================================
##
##Check for Pre-Requsite
##
##============================================================================
path="$PATH"
IFS=":"
ccYes=0
missing=0
cmdlist="cc:gcc:g++:make"
for cc in $cmdlist
do
echo "checking for $cc"
for i in $path
do
if test -f $i/$cc; then
ccYes=1
break
fi
done
if [ "$ccYes" = "1" ];
then
echo "$cc :yes"
else
echo "$cc :no"
missing=1
break
fi
done
if [ "missing" = "1" ]; then
echo "$0: missing dependency $cc"
exit 1;
fi
##==============================================================================
##
## Detect openssl.
##
##==============================================================================
enable_ssl=0
with_ssl=""
if [ "$tiny" != "1" ] ;then
sslcmd="openssl"
sslYes=0
echo "checking for $sslcmd"
for i in $path
do
if test -f $i/$sslcmd; then
sslYes=1
withssl=$i
break
fi
done
if [ "$sslYes" = "1" ]; then
echo "ssl: Yes = $withssl/$sslcmd"
with_ssl=${withssl%/*}
else
echo "ssl: No"
fi
if [ ! -z "$with_ssl" ]; then
if [ ! -d "$with_ssl" ]; then
echo "$0: Error: No such directory: --with-ssl=$with_ssl"
exit 1;
fi
if [ ! -f "$with_ssl/include/openssl/ssl.h" ]; then
echo "$0: missing dependency: \$with_ssl/include/openssl/ssl.h"
missing=1
fi
if [ ! -f "$with_ssl/$libbase/libssl.so" ]; then
echo "$0: missing dependency: \$with_ssl/$libbase/libssl.so"
missing=1
fi
if [ "$missing" = "1" ]; then
echo "$0: where --with-ssl=$with_ssl"
unset with_ssl
else
enable_ssl=1
fi
fi
fi
##==============================================================================
##
## Detect openslp.
## Note that if openslp is not found it should use pegasus slp.
##
##==============================================================================
enable_slp=0
with_openslp=""
enable_openslp=0
if [ "$tiny" != "1" ] ;then
slpcmd="slptool"
slpYes=0
echo "checking for openslp"
for i in $path
do
if test -f $i/$slpcmd; then
slpYes=1
withslp=$i
break
fi
done
if [ "$slpYes" = "1" ]; then
echo "slp: Yes = $withslp/$slpcmd"
with_openslp=${withslp%/*}
else
echo "slp: No"
fi
if [ ! -z "$with_openslp" ]; then
if [ ! -d "$with_openslp" ]; then
echo "$0: Error: No such directory: --with-openslp=$with_openslp"
exit 1;
fi
if [ ! -f "$with_openslp/include/slp.h" ]; then
echo "$0: missing dependency: \$with_openslp/include/slp.h"
missing=1
fi
if [ ! -f "$with_openslp/$libbase/libslp.so" ]; then
echo "$0: missing dependency: \$with_openslp/$libbase/libslp.so"
missing=1
fi
if [ "$missing" = "1" ]; then
echo "$0: where --with-openslp=$with_openslp"
enable_slp=1
else
enable_openslp=1
fi
fi
fi
##==============================================================================
##
## Detect sqlite.
##
##==============================================================================
enable_sql=0
if [ "$tiny" != "1" ] ;then
sqlcmd="sqlite3"
sqlYes=0
echo "checking for sql"
for i in $path
do
if test -f $i/$sqlcmd; then
sqlYes=1
withsql=$i
break
fi
done
if [ "$sqlYes" = "1" ]; then
echo "sql: Yes = $withsql/$sqlcmd"
with_sql=${withsql%/*}
else
echo "sql: No"
fi
if [ ! -z "$with_sql" ]; then
if [ ! -d "$with_sql" ]; then
echo "$0: Error: No such directory: $with_sql"
exit 1;
fi
if [ ! -f "$with_sql/lib64/libsqlite3.so" ]; then
echo "$0: missing dependency: \$with_sql/lib64/libsqlite3.so"
missing=1
fi
if [ ! -f "$with_sql/include/sqlite3.h" ]; then
echo "$0:missing dependency :\$with_sql/include/sqlite3.h"
missing=1
fi
if [ "$missing" = "1" ]; then
echo "$0: sql not installed properly at $with_sql"
else
enable_sql=1
fi
fi
fi
##==============================================================================
##
## Detect net-snmp.
##
##==============================================================================
enable_snmp=0
if [ "$tiny" != "1" ]; then
snmpcmd="net-snmp-config"
snmpYes=0
echo "checking for net-snmp"
for i in $path
do
if test -f $i/$snmpcmd; then
snmpYes=1
withsnmp=$i
break
fi
done
if [ "$snmpYes" = "1" ]; then
echo "snmp: Yes = $withsnmp/$snmpcmd"
with_snmp=${withsnmp%/*}
else
echo "snmp: No"
fi
if [ ! -z "$with_snmp" ]; then
if [ ! -d "$with_snmp" ]; then
echo "$0: Error: No such directory: $with_snmp"
exit 1;
fi
if [ ! -f "$with_snmp/lib64/libnetsnmp.so" ]; then
echo "$0: missing dependency: "
missing=1
fi
if [ "$missing" = "1" ]; then
echo "$0: snmp not installed properly at $with_snmp"
else
enable_snmp=1
fi
fi
fi
##=============================================================================
##
##Detect icu ( Currently supported till 3.6)
##
##=============================================================================
supporticu=0
if [ "$tiny" != "1" ] ;then
icucmd="icu-config"
gencmd="genrb"
icuYes=0
echo "checking for icu"
for i in $path
do
if test -f $i/$icucmd ;then
if test -f $i/$gencmd ; then
icuYes=1
withicu=$i
break
fi
fi
done
if [ "$icuYes" = "1" ]; then
echo "icu: Yes = $withicu/$icucmd"
with_icu=${withicu%/*}
else
echo "icu: No"
fi
if [ "$icuYes" = "1" ]; then
icuversion=$(icu-config --version)
echo $icuversion
IFS='.'
op=0
for i in $icuversion
do
if [ "$op" = "0" ]; then
icumajor=$i
fi
if [ "$op" = "1" ]; then
icuminor=$i
fi
if [ "$op" -gt "1" ]; then
break
fi
op=$((op+1))
done
IFS='@@@'
supporticu=0
if [ "$icumajor" -le "3" -a "$icuminor" -le "6" ]; then
supporticu=1
fi
if [ "$supporticu" = "1" ]; then
if test -f $with_icu/$libbase/libicul18n.so; then
echo " missing dependency "
missing=1
supporticu=0
fi
fi
fi
fi
##=============================================================================
##
##Detect libz
##
##=============================================================================
libzpath=/usr
enable_libz=1
if [ ! -f "$libzpath/$libbase/libz.so" ]; then
echo " libz not found"
enable_libz=0
fi
if [ ! -f "$libzpath/include/zlib.h" ]; then
echo " libz not found"
enable_libz=0
fi
if [ "$libbase" = "lib64" ]; then
enable_32bit=1
fi
##==============================================================================
##
## These options (if non-empty) must denote absolute directory names.
##
##==============================================================================
for i in \
prefix \
bindir \
sbindir \
libdir \
includedir \
datadir
do
eval v=$`echo $i`
case $v in
/* | "")
;;
*)
echo "$0: Error: Must be an absolute directory name: --$i=$v"
exit 1;
;;
esac
done
if [ "$tiny" != "1" ] ;then
for i in \
with_ssl \
with_pam
do
eval v=$`echo $i`
case $v in
/* | "")
;;
*)
echo "$0: Error: Must be an absolute directory name: --$i=$v"
exit 1;
;;
esac
done
fi
##==============================================================================
##
## Check whether the test user will be able to access pegasus home.
##
##==============================================================================
if [ "$test_option" = "-1" ] ; then
with_test_user=guest
with_test_user_pass=guest
uid=`id -u`
cwd=`/bin/pwd`
if [ "$uid" = "0" -a "$disable_tests" != "1" ]; then
if [ "$enable_pam" = "1" -o "$enable_pam_standalone" = "1" ]; then
su $with_test_user -c "/bin/true"
if [ "$?" != "0" ]; then
echo "$0: The test user account ($with_test_user) does not exist on this system. Please create a test user with this name or designate an existing one with the --with-test-user option."
exit 1
fi
su $with_test_user -c "cd $cwd 2> /dev/null"
if [ "$?" != "0" ]; then
echo "$0: The test user account ($with_test_user) has insufficient privileges to access the pegasus root directory ($cwd), which will cause the user-context tests to fail. Please configure from a different directory."
exit 1
fi
else
echo "Warning: Using --with-test-user without --enable_pam or --enable-pam-standalone"
fi
fi
fi
##==============================================================================
##
## Detect pam
##
##==============================================================================
enable_pam=0
if [ "$tiny" != "1" ] ;then
pamcmd="pam_console_apply"
pamYes=0
IFS=':'
echo "checking for pam"
for i in $path
do
if test -f $i/$pamcmd; then
pamYes=1
withpam=$i
break
fi
done
if [ "$pamYes" = "1" ]; then
echo "pam: Yes = $withpam/$pamcmd"
with_pam=${withpam%/*}
if [ "$with_pam" = "" ]; then
with_pam=/
fi
else
echo "pam: No"
fi
if [ ! -z "$with_pam" ]
then
if [ ! -f "/usr/include/security/pam_appl.h" -a \
! -f "/usr/local/include/security/pam_appl.h" ]
then
echo "$0: <security/pam_appl.h> is missing (required by --enable_pam)"
exit 1
else
enable_pam=1
fi
fi
fi
##==============================================================================
##
## Create options.mak
##
##==============================================================================
options=options.mak
rm -f $options
echo "# This file was generated by configure." >> $options
echo "# ./configure $*" >> $options
echo " " >> $options
echo "## WARNING: The configure script is experimental and has known problems." >> $options
echo "## Use it at your own risk and review the results carefully in this" >> $options
echo "## options.mak file that it created." >> $options
PEGASUS_HOME=$prefix
PEGASUS_ROOT=$prefix
PEGASUS_PLATFORM=$platform
echo "export ROOT=$prefix" >> $options
#echo "export PATH=$PATH:$cwd/$platform/bin" >> $options
#echo "export LD_LIBRARY_PATH=$cwd/$platform/lib:$libdir" >> $options
echo "export PEGASUS_PLATFORM=$platform" >> $options
echo "export PEGASUS_ROOT=$prefix" >> $options
echo "export PEGASUS_HOME=$prefix" >> $options
if [ "$tiny" != "1" ];
then
enable_debug=1
interop_name=root/PG_InterOp
echo "export PEGASUS_ENABLE_AUDIT_LOGGER=true" >> $options
echo "export PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT=true" >> $options
echo "export PEGASUS_ENABLE_EMAIL_HANDLER=true" >> $options
echo "export PEGASUS_ENABLE_INDICATION_COUNT=true" >> $options
echo "export PEGASUS_ENABLE_INTEROP_PROVIDER=true" >> $options
if [ "$dis_wsman" != "1" ]; then
echo "export PEGASUS_ENABLE_PROTOCOL_WSMAN=true" >> $options
fi
echo "export PEGASUS_ENABLE_SYSTEM_LOG_HANDLER=true" >> $options
echo "export PEGASUS_ENABLE_USERGROUP_AUTHORIZATION=true" >> $options
#echo "export PEGASUS_ENABLE_PRIVILEGE_SEPARATION=true" >>$options
fi
if [ "$disable_oop" = "1" ]
then
echo "export PEGASUS_DEFAULT_ENABLE_OOP=false" >> $options
echo "export PEGASUS_DISABLE_PROV_USERCTXT=1" >> $options
echo "export PEGASUS_DISABLE_PRIVILEGED_TESTS=true" >> $options
fi
echo "export PEGASUS_ENABLE_CQL=true" >> $options
echo "export PEGASUS_ENABLE_WQL=true" >> $options
if [ "$disable_ipv6" = "1" ];
then
echo "export PEGASUS_ENABLE_IPV6=false" >> $options
else
echo "export PEGASUS_ENABLE_IPV6=true" >> $options
fi
echo "export PEGASUS_INTEROP_NAMESPACE=$interop_name" >> $options
if [ "$disable_trace" = "1" ];
then
echo "export PEGASUS_REMOVE_TRACE=1" >> $options
fi
if [ "$disable_tests" = "1" ];
then
echo "export PEGASUS_SKIP_MOST_TEST_DIRS=true" >> $options
fi
if [ "$enable_perinst" = "1" ];
then
echo "export PEGASUS_DISABLE_PERFINST=true" >> $options
echo "export PEGASUS_INDICATION_PERFINST=true" >> $options
fi
if [ "$enable_debug" = 1 ]
then
echo "export PEGASUS_DEBUG=1" >> $options
fi
if [ "$enable_mrr_generation" = 1 ]
then
echo "export PEGASUS_ENABLE_MRR_GENERATION=1" >> $options
fi
if [ "$enable_mrr" = 1 ]
then
echo "export PEGASUS_ENABLE_MRR=1" >> $options
fi
if [ "$enable_pam" = "1" ]; then
echo "export PEGASUS_PAM_AUTHENTICATION=true" >> $options
echo "export PEGASUS_USE_PAM_STANDALONE_PROC=false" >> $options
\cp -f $PEGASUS_ROOT/rpm/wbem /etc/pam.d
chmod 0644 /etc/pam.d/wbem
fi
if [ "$enable_pam_standalone" = "1" ]; then
echo "export PEGASUS_PAM_AUTHENTICATION=true" >> $options
echo "export PEGASUS_USE_PAM_STANDALONE_PROC=true" >> $options
\cp -f $PEGASUS_ROOT/rpm/wbem /etc/pam.d
chmod 0644 /etc/pam.d/wbem
fi
if [ "$enable_binary_repository" = "1" ]; then
echo "export PEGASUS_REPOSITORY_MODE=BIN" >> $options
fi
if [ "$enable_libz" = "1" ]; then
echo "export PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1" >> $options
fi
if [ "$enable_ssl" = "1" ]; then
echo "export PEGASUS_HAS_SSL=true" >> $options
echo "export PEGASUS_ENABLE_SSL_CRL_VERIFICATION=true" >> $options
fi
if [ ! -z "$with_ssl" ]; then
echo "export OPENSSL_HOME=$with_ssl" >> $options
fi
if [ "$enable_slp" = "1" ]; then
echo "export PEGASUS_ENABLE_SLP=true" >> $options
fi
if [ "$enable_sql" = "1" ]; then
echo "export PEGASUS_USE_SQLITE_REPOSITORY=true" >> $options
echo "export SQLITE_HOME=$with_sql">> $options
fi
if [ "$enable_snmp" = "1" ]; then
echo "export PEGASUS_ENABLE_NET_SNMPV3=true" >> $options
echo "export PEGASUS_USE_NET_SNMP=true" >> $options
fi
if [ "$enable_openslp" = "1" ]; then
echo "export PEGASUS_ENABLE_SLP=true" >> $options
echo "export PEGASUS_USE_EXTERNAL_SLP=openslp" >> $options
fi
#if [ ! -z "$with_external_slp" ]; then
# echo "export PEGASUS_ENABLE_SLP=true" >> $options
# echo "export PEGASUS_USE_EXTERNAL_SLP=$with_external_slp" >> $options
#fi
if [ ! -z "$with_external_slp_dir" ]; then
echo "export PEGASUS_EXTERNAL_SLP_HOME=$with_external_slp_dir" >> $options
fi
if [ ! -z "$with_openslp" ]; then
echo "export PEGASUS_EXTERNAL_SLP_HOME=$with_openslp" >> $options
fi
if [ "$disable_cmpi" != "1" ]; then
echo "export PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=true" >> $options
fi
if [ ! -z "$flavor" ]; then
echo "export PEGASUS_FLAVOR=tog">>$options
fi
if [ "$supporticu" = "1" ]; then
echo "export PEGASUS_HAS_MESSAGES=true">>$options
echo "export PEGASUS_HAS_ICU=true">>$options
echo "export PEGASUS_USE_DEFAULT_MESSAGES=true">>$options
# echo "export ICU_INSTALL=$with_icu">>$options
fi
if [ "$enable_32bit" = "1" ]; then
#echo "export PEGASUS_INTERNAL_ENABLE_32BIT_PROVIDER_SUPPORT=true" >> $options
echo "export PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=$platform" >> $options
fi
if [ "$test_option" = "1" ]; then
echo "export PEGASUS_CCOVER=true" >> $options
echo "export PEGASUS_DISABLE_PRIVILEGED_TESTS=false" >> $options
echo "export PEGASUS_ENABLE_GCOV=true" >> $options
echo "export PEGASUS_ENABLE_SORTED_DIFF=true" >> $options
echo "export PEGASUS_TEST_ENABLE_DEBUG_TRACE=true" >> $options
echo "export PEGASUS_TEST_ISGROUP_GROUP=root" >> $options
echo "export PEGASUS_TEST_ISGROUP_USER_FAILURE=test" >> $options
echo "export PEGASUS_TEST_ISGROUP_USER_SUCCESS=root" >> $options
echo "export PEGASUS_TEST_SDK=true" >> $options
echo "export PEGASUS_TEST_USER_DEFINED=false" >> $options
echo "#export PEGASUS_TEST_USER_ID=" >> $options
echo "#export PEGASUS_TEST_USER_PASS=" >> $options
echo "export PEGASUS_TEST_VALGRIND_LOG_DIR=." >> $options
echo "export PEGASUS_OVERRIDE_SSL_CERT_VERIFICATION_RESULT=true" >> $options
echo "export PEGASUS_TMP=." >> $options
echo "export PLATFORM_CORE_PATTERN=true" >> $options
fi
echo "export PATH=$bindir:$PATH" >> $options
echo "export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH" >> $options
IFS="@@@"
export PATH=$bindir:$PATH
export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
export PEGASUS_HOME PEGASUS_ROOT PEGASUS_PLATFORM
echo "created $options"
## if the output file exists, make a backup
if [ -f $options ]; then
echo backup $options to $options.bak
cp -f $options $options.bak
fi
. ./$options
##==============================================================================
##
## Create GNUmakefile
##
##==============================================================================
cat > GNUmakefile << END
include options.mak
export PATH := \$(PATH):\$(PEGASUS_HOME)/bin
export LD_LIBRARY_PATH := \$(LD_LIBRARY_PATH):\$(PEGASUS_HOME)/bin
include Makefile
distclean:
rm -f GNUmakefile
rm -f options.mak
rm -f options.mak.bak
END
echo "created GNUmakefile"
##==============================================================================
##
## Print final message:
##
##==============================================================================
echo "configured for $platform"
echo ===================
echo WARNING: This script is experimental and has known problems. Please
echo use it at your own risk and review the results carefully in the \