(file) Return to configure CVS log (file) (dir) Up to [Pegasus] / pegasus

   1 karl  1.1 #!/bin/sh
   2           #set -x
   3           #//%LICENSE////////////////////////////////////////////////////////////////
   4           #//
   5           #// Licensed to The Open Group (TOG) under one or more contributor license
   6           #// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
   7           #// this work for additional information regarding copyright ownership.
   8           #// Each contributor licenses this file to you under the OpenPegasus Open
   9           #// Source License; you may not use this file except in compliance with the
  10           #// License.
  11           #//
  12           #// Permission is hereby granted, free of charge, to any person obtaining a
  13           #// copy of this software and associated documentation files (the "Software"),
  14           #// to deal in the Software without restriction, including without limitation
  15           #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
  16           #// and/or sell copies of the Software, and to permit persons to whom the
  17           #// Software is furnished to do so, subject to the following conditions:
  18           #//
  19           #// The above copyright notice and this permission notice shall be included
  20           #// in all copies or substantial portions of the Software.
  21           #//
  22 karl  1.1 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  23           #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24           #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  25           #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  26           #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  27           #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  28           #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29           #//
  30           #//////////////////////////////////////////////////////////////////////////
  31           
  32           ##==============================================================================
  33           ##
  34           ## Check for existence of pegasus config.mak. If this does not exist, it means
  35           ## that the distribution is incomplete or that the configure file has been run
  36           ## from the wrong directory.
  37           ##
  38           ##==============================================================================
  39           tiny=0
  40           prefix=""
  41           test_option=0
  42           disable_tests=0
  43 karl  1.1 disable_tests=0
  44           interop_name=""
  45           enable_pertinst=0
  46           dis_wsman=0
  47           config=mak/config.mak
  48           
  49 karl  1.5 echo ===================
  50           echo WARNING: This script is experimental and has known problems. Please
  51           echo      use it at your own risk and review the results carefully in the \
  52           echo      options.mak file that it creates.  Until this script is completed
  53           echo      the traditional OpenPegasus build configuration through environment
  54           echo      variables will remain in place and is the prefered setup tool
  55           echo ===================
  56           
  57 karl  1.1 if [ ! -f "$config" ]; then
  58               echo "$0: Error: ./configure must be run from root of Pegasus distribution."
  59               echo
  60               exit 1
  61           fi
  62           
  63           ##==============================================================================
  64           ##
  65           ## Collection command line options.
  66           ##
  67           ##==============================================================================
  68           
  69           help=
  70           
  71           for opt
  72           do
  73           
  74             optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
  75           
  76             case $opt in
  77           
  78 karl  1.1     -h | --help)
  79                 help=1
  80                 ;;
  81           
  82               --prefix=*)
  83                 prefix=$optarg
  84                 ;;
  85           
  86               --test)
  87                 test_option=1
  88                 ;;
  89           
  90               --tiny)
  91                 tiny=1
  92                 disable_trace=1
  93                 disable_tests=1
  94                 interop_name=interop
  95                 enable_perinst=1
  96                 ;;
  97           
  98               --flavor=*)
  99 karl  1.1       flavor=$optarg
 100                 ;;
 101            
 102               --disable-wsman)
 103                 dis_wsman=1
 104                 ;;
 105           
 106               *)
 107                 echo "$0: unknown option:  $opt"
 108                 exit 1
 109                 ;;
 110           
 111             esac
 112           done
 113           
 114           ##==============================================================================
 115           ##
 116           ## Print help message if --help given on command line.
 117           ##
 118           ##==============================================================================
 119           
 120 karl  1.1 if [ "$help" = "1" ]; then
 121           cat<<END
 122           
 123           Usage: ./configure [OPTION]...
 124           
 125           Configures OpenPegasus build options.
 126           
 127 karl  1.5    WARNING: This script is experimental and has known problems. Please
 128                 use it at your own risk and review the results carefully in the
 129                 options.mak file that it creates.Until this script is completed
 130                 the traditional OpenPegasus build configuration through environment
 131                 variables will remain in place and is the prefered setup tool
 132           
 133 karl  1.1 Configure examples.
 134               $ ./configure
 135               $ make
 136           
 137           Options:
 138               --help
 139                   Print this help message.
 140               --prefix=DIR
 141                   Install under DIR
 142               --test
 143                   Build with test options included.
 144               --tiny
 145 karl  1.5         Build tiny version of pegasus with support to SSL,SLP,ICU and
 146                   PAM all disabled.
 147 karl  1.1     --flavor
 148                   Building pegasus with the given flavor tag.
 149           END
 150           fi
 151           
 152           
 153           
 154           ##==============================================================================
 155           ##
 156           ## Guess the platform.
 157           ##
 158           ##==============================================================================
 159           if [ "$help" != "1" ]; then
 160           if [ -z "$platform" ]; then
 161           
 162             machine=`(uname -m) 2>/dev/null` || machine=unknown
 163             system=`(uname -s) 2>/dev/null`  || system=unknown
 164             token="$machine:$system"
 165           
 166             case "$token" in
 167           
 168 karl  1.1     i686:Linux)
 169                 platform=LINUX_IX86_GNU
 170                 libbase=lib
 171                 ;;
 172           
 173               x86_64:Linux)
 174                 platform=LINUX_X86_64_GNU
 175                 libbase=lib64
 176                 ;;
 177           
 178               sun*:SunOS)
 179                 platform=SOLARIS_SPARC_64_CC
 180                 libbase=lib/64
 181                 ;;
 182           
 183               i86pc:SunOS)
 184                 platform=SOLARIS_X86_64_CC
 185                 libbase=lib/64
 186                 ;;
 187               
 188               ia64:HP-UX)
 189 karl  1.1       platform=HPUX_IA64_ACC
 190                 libbase=lib/64
 191                 ;;
 192            
 193               9000/800:HP-UX)
 194                 platform=HPUX_PARISC_ACC
 195                 libbase=lib
 196                 ;;
 197           
 198               ia64:Linux)
 199                 platform=LINUX_IA64_GNU
 200                 libbase=lib/64
 201                 ;;
 202               
 203               ppc:Linux)
 204                 platform=LINUX_PPC_GNU
 205                 libbase=lib
 206                 ;;
 207              
 208               ppc64:Linux)
 209                 platform=LINUX_PPC64_GNU
 210 karl  1.1       libbase=lib/64
 211                 ;;
 212           
 213               s390x:Linux)
 214                 platform=LINUX_ZSERIES64_GNU
 215                 libbase=lib/64
 216                 ;;
 217           
 218               s390:Linux)
 219                 platform=LINUX_ZSERIES_GNU
 220                 libbase=lib/64
 221                 ;;
 222           
 223           
 224               *)
 225                   
 226                unresolved=1
 227                ;;
 228           
 229             esac
 230           
 231 karl  1.1   if [ "unresolved" = "1" ]; then
 232                 Machine=`(Uname -m) 2>/dev/null`||Machine=unknown
 233                 System=`(Uname -s) 2>/dev/null`||System=unknown
 234                 Token="$Machine:$System"  
 235           
 236                 case "$Token" in
 237           
 238                 alpha:VMS)
 239                    platform=VMS_ALPHA_DECCXX
 240                    libbase=lib
 241                    ;;
 242           
 243                 IA64:OpenVMS)
 244                    platform=VMS_IA64_DECCXX
 245                    libbase=lib/64
 246                    ;;
 247           
 248                 *)
 249                   echo "$0: Failed to guess platform"
 250                   echo "  machine=$machine"
 251                   echo "  system=$system"
 252 karl  1.1         exit 1
 253                   ;;
 254              
 255                 esac
 256              fi
 257           fi
 258           
 259           ##==============================================================================
 260           ##
 261           ## Resolve default directory names.
 262           ##
 263           ##==============================================================================
 264           
 265           # --prefix:
 266           
 267           if [ -z "$prefix" ]; then
 268             prefix=`pwd`
 269           fi
 270           
 271           # --bindir:
 272           
 273 karl  1.1 if [ -z "$bindir" ]; then
 274             bindir=$prefix/bin
 275           fi
 276           
 277           # --sbindir:
 278           
 279           if [ -z "$sbindir" ]; then
 280             sbindir=$prefix/sbin
 281           fi
 282           
 283           # --libdir:
 284           
 285           if [ -z "$libdir" ]; then
 286             libdir=$prefix/$libbase
 287           fi
 288           
 289           # --includedir:
 290           
 291           if [ -z "$includedir" ]; then
 292             includedir=$prefix/include
 293           fi
 294 karl  1.1 
 295           if [ -z "$with_pam" ]; then
 296             with_pam=/etc/pam.d
 297           fi
 298           
 299           ##=============================================================================
 300           ##
 301           ##Check for Pre-Requsite
 302           ##
 303           ##============================================================================
 304           
 305           path="$PATH"
 306           IFS=":"
 307           ccYes=0
 308           missing=0
 309           cmdlist="cc:gcc:g++:make"
 310           for cc in $cmdlist
 311           do
 312           echo "checking for $cc"
 313           for i in $path
 314           do
 315 karl  1.1   if test -f $i/$cc; then
 316                ccYes=1
 317                break
 318             fi
 319           done
 320           
 321           if [ "$ccYes" = "1" ];
 322           then
 323              echo "$cc :yes"
 324           else
 325              echo "$cc :no"
 326              missing=1
 327              break
 328           fi
 329           done
 330           
 331           if [ "missing" = "1" ]; then
 332              echo "$0: missing dependency $cc"
 333              exit 1;
 334           fi    
 335           
 336 karl  1.1 ##==============================================================================
 337           ##
 338           ## Detect openssl.
 339           ##
 340           ##==============================================================================
 341           enable_ssl=0
 342           with_ssl=""
 343           if [ "$tiny" != "1" ] ;then
 344           sslcmd="openssl"
 345           sslYes=0
 346           echo "checking for $sslcmd"
 347           for i in $path
 348           do
 349             if test -f $i/$sslcmd; then
 350                sslYes=1
 351                withssl=$i
 352                break
 353             fi
 354           done
 355           if [ "$sslYes" = "1" ]; then
 356              echo "ssl: Yes = $withssl/$sslcmd"
 357 karl  1.1    with_ssl=${withssl%/*}
 358           else
 359              echo "ssl: No"
 360           fi
 361           
 362           if [ ! -z "$with_ssl" ]; then
 363           
 364             if [ ! -d "$with_ssl" ]; then
 365               echo "$0: Error: No such directory: --with-ssl=$with_ssl"
 366               exit 1;
 367             fi
 368           
 369             if [ ! -f "$with_ssl/include/openssl/ssl.h" ]; then
 370               echo "$0: missing dependency: \$with_ssl/include/openssl/ssl.h"
 371               missing=1
 372             fi
 373           
 374             if [ ! -f "$with_ssl/$libbase/libssl.so" ]; then
 375 karl  1.4     echo "$0: missing dependency: \$with_ssl/$libbase/libssl.so"
 376 karl  1.1     missing=1
 377             fi
 378           
 379             if [ "$missing" = "1" ]; then
 380               echo "$0: where --with-ssl=$with_ssl"
 381               unset with_ssl
 382             else
 383               enable_ssl=1
 384             fi
 385           
 386           fi
 387           fi
 388           ##==============================================================================
 389           ##
 390           ## Detect openslp.
 391           ## Note that if openslp is not found it should use pegasus slp.
 392           ##
 393           ##==============================================================================
 394           enable_slp=0
 395           with_openslp=""
 396           enable_openslp=0
 397 karl  1.1 if [ "$tiny" != "1" ] ;then
 398           slpcmd="slptool"
 399           slpYes=0
 400           echo "checking for openslp"
 401           for i in $path
 402           do
 403             if test -f $i/$slpcmd; then
 404                slpYes=1
 405                withslp=$i
 406                break
 407             fi
 408           done
 409           if [ "$slpYes" = "1" ]; then
 410               echo "slp: Yes = $withslp/$slpcmd"
 411               with_openslp=${withslp%/*}
 412           else
 413               echo "slp: No"
 414           fi
 415           
 416           
 417           
 418 karl  1.1 if [ ! -z "$with_openslp" ]; then
 419           
 420             if [ ! -d "$with_openslp" ]; then
 421               echo "$0: Error: No such directory: --with-openslp=$with_openslp"
 422               exit 1;
 423             fi
 424           
 425             if [ ! -f "$with_openslp/include/slp.h" ]; then
 426               echo "$0: missing dependency: \$with_openslp/include/slp.h"
 427               missing=1
 428             fi
 429           
 430             if [ ! -f "$with_openslp/$libbase/libslp.so" ]; then
 431               echo "$0: missing dependency: \$with_openslp/$libbase/libslp.so"
 432               missing=1
 433             fi
 434           
 435             if [ "$missing" = "1" ]; then
 436               echo "$0: where --with-openslp=$with_openslp"
 437               enable_slp=1
 438             else
 439 karl  1.1     enable_openslp=1  
 440             fi
 441           
 442           fi
 443           fi
 444           
 445           ##==============================================================================
 446           ##
 447           ## Detect sqlite.
 448           ##
 449           ##==============================================================================
 450           enable_sql=0
 451           
 452           if [ "$tiny" != "1" ] ;then
 453           sqlcmd="sqlite3"
 454           sqlYes=0
 455           echo "checking for sql"
 456           for i in $path
 457           do
 458             if test -f $i/$sqlcmd; then
 459                sqlYes=1
 460 karl  1.1      withsql=$i
 461                break
 462             fi
 463           done
 464           if [ "$sqlYes" = "1" ]; then
 465               echo "sql: Yes = $withsql/$sqlcmd"
 466               with_sql=${withsql%/*}
 467           else
 468               echo "sql: No"
 469           fi
 470           
 471           
 472           
 473           if [ ! -z "$with_sql" ]; then
 474           
 475             if [ ! -d "$with_sql" ]; then
 476               echo "$0: Error: No such directory: $with_sql"
 477               exit 1;
 478             fi
 479           
 480             if [ ! -f "$with_sql/lib64/libsqlite3.so" ]; then
 481 karl  1.1     echo "$0: missing dependency: \$with_sql/lib64/libsqlite3.so"
 482               missing=1
 483             fi
 484             if [ ! -f "$with_sql/include/sqlite3.h" ]; then
 485               echo "$0:missing dependency :\$with_sql/include/sqlite3.h"
 486               missing=1
 487             fi
 488             if [ "$missing" = "1" ]; then
 489               echo "$0: sql not installed properly at $with_sql"
 490             else
 491               enable_sql=1
 492             fi
 493           
 494           fi
 495           fi
 496           
 497           ##==============================================================================
 498           ##
 499           ## Detect net-snmp.
 500           ##
 501           ##==============================================================================
 502 karl  1.1 
 503           enable_snmp=0
 504           if [ "$tiny" != "1" ]; then
 505           snmpcmd="net-snmp-config"
 506           snmpYes=0
 507           echo "checking for net-snmp"
 508           for i in $path
 509           do
 510             if test -f $i/$snmpcmd; then
 511                snmpYes=1
 512                withsnmp=$i
 513                break
 514             fi
 515           done
 516           if [ "$snmpYes" = "1" ]; then
 517               echo "snmp: Yes = $withsnmp/$snmpcmd"
 518               with_snmp=${withsnmp%/*}
 519           else
 520               echo "snmp: No"
 521           fi
 522           
 523 karl  1.1 
 524           
 525           if [ ! -z "$with_snmp" ]; then
 526           
 527             if [ ! -d "$with_snmp" ]; then
 528               echo "$0: Error: No such directory: $with_snmp"
 529               exit 1;
 530             fi
 531           
 532             if [ ! -f "$with_snmp/lib64/libnetsnmp.so" ]; then
 533               echo "$0: missing dependency: "
 534               missing=1
 535             fi
 536           
 537             if [ "$missing" = "1" ]; then
 538               echo "$0: snmp not installed properly at $with_snmp"
 539             else
 540               enable_snmp=1
 541             fi
 542           
 543           fi
 544 karl  1.1 fi
 545           
 546           ##=============================================================================
 547           ##
 548           ##Detect icu ( Currently supported till 3.6)
 549           ##
 550           ##=============================================================================
 551           supporticu=0
 552           if [ "$tiny" != "1" ] ;then
 553           icucmd="icu-config"
 554           gencmd="genrb"
 555           icuYes=0
 556           echo "checking for icu"
 557           for i in $path
 558           do
 559             if test -f $i/$icucmd ;then
 560                if test -f $i/$gencmd ; then
 561                    icuYes=1
 562                    withicu=$i
 563                    break
 564                fi
 565 karl  1.1   fi
 566           done
 567           if [ "$icuYes" = "1" ]; then
 568               echo "icu: Yes = $withicu/$icucmd"
 569               with_icu=${withicu%/*}
 570           else
 571               echo "icu: No"
 572           fi
 573           
 574 karl  1.2 if [ "$icuYes" = "1" ]; then
 575 karl  1.1    icuversion=$(icu-config --version)
 576           
 577              echo $icuversion
 578              IFS='.'
 579              op=0
 580              for i in $icuversion
 581              do
 582                 if [ "$op" = "0" ]; then
 583                    icumajor=$i
 584                 fi
 585                 if [ "$op" = "1" ]; then
 586                    icuminor=$i
 587                 fi
 588                 if [ "$op" -gt "1" ]; then
 589                    break
 590                 fi
 591                 op=$((op+1))
 592              done
 593              IFS='@@@'
 594              supporticu=0
 595           
 596 karl  1.1    if [ "$icumajor" -le "3" -a "$icuminor" -le "6" ]; then
 597                 supporticu=1
 598              fi
 599           
 600              if [ "$supporticu" = "1" ]; then
 601                 
 602                 if test -f $with_icu/$libbase/libicul18n.so; then
 603                   echo " missing dependency "
 604                   missing=1
 605                   supporticu=0
 606                 fi
 607              fi
 608           
 609           fi
 610           
 611           fi
 612           
 613           ##=============================================================================
 614           ##
 615           ##Detect libz 
 616           ##
 617 karl  1.1 ##=============================================================================
 618           libzpath=/usr
 619           enable_libz=1
 620           if [ ! -f "$libzpath/$libbase/libz.so" ]; then
 621               echo " libz not found"
 622               enable_libz=0
 623           fi
 624           if [ ! -f "$libzpath/include/zlib.h" ]; then
 625               echo " libz not found"
 626               enable_libz=0
 627           fi
 628           
 629           if [ "$libbase" = "lib64" ]; then
 630              enable_32bit=1
 631           fi
 632           
 633           ##==============================================================================
 634           ##
 635           ## These options (if non-empty) must denote absolute directory names.
 636           ##
 637           ##==============================================================================
 638 karl  1.1 
 639           for i in \
 640             prefix \
 641             bindir \
 642             sbindir \
 643             libdir \
 644             includedir \
 645             datadir
 646           do
 647           
 648             eval v=$`echo $i`
 649           
 650             case $v in
 651               /* | "")
 652                 ;;
 653           
 654               *)
 655                 echo "$0: Error: Must be an absolute directory name: --$i=$v"
 656                 exit 1;
 657                 ;;
 658             esac
 659 karl  1.1 
 660           done
 661           if [ "$tiny" != "1" ] ;then
 662           for i in \
 663             with_ssl \
 664             with_pam 
 665           do
 666           
 667             eval v=$`echo $i`
 668           
 669             case $v in
 670               /* | "")
 671                 ;;
 672           
 673               *)
 674                 echo "$0: Error: Must be an absolute directory name: --$i=$v"
 675                 exit 1;
 676                 ;;
 677             esac
 678           
 679           done
 680 karl  1.1 fi 
 681                
 682           ##==============================================================================
 683           ##
 684           ## Check whether the test user will be able to access pegasus home.
 685           ##
 686           ##==============================================================================
 687           if [ "$test_option" = "-1" ] ; then
 688           with_test_user=guest
 689           with_test_user_pass=guest
 690           uid=`id -u`
 691           cwd=`/bin/pwd`
 692           
 693           if [ "$uid" = "0" -a "$disable_tests" != "1" ]; then
 694           
 695             if [ "$enable_pam" = "1" -o "$enable_pam_standalone" = "1" ]; then
 696           
 697               su $with_test_user -c "/bin/true"
 698           
 699               if [ "$?" != "0" ]; then
 700                 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."
 701 karl  1.1       exit 1
 702               fi
 703           
 704               su $with_test_user -c "cd $cwd 2> /dev/null"
 705           
 706               if [ "$?" != "0" ]; then
 707                 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."
 708                 exit 1
 709               fi
 710             else
 711                echo "Warning: Using --with-test-user without --enable_pam or --enable-pam-standalone"
 712             fi
 713           
 714           
 715           fi
 716           fi
 717           ##==============================================================================
 718           ##
 719           ## Detect pam
 720           ##
 721           ##==============================================================================
 722 karl  1.1 enable_pam=0
 723           if [ "$tiny" != "1" ] ;then
 724           pamcmd="pam_console_apply"
 725           pamYes=0
 726           IFS=':'
 727           echo "checking for pam"
 728           for i in $path
 729           do
 730             if test -f $i/$pamcmd; then
 731                pamYes=1
 732                withpam=$i
 733                break
 734             fi
 735           done
 736           if [ "$pamYes" = "1" ]; then
 737               echo "pam: Yes = $withpam/$pamcmd"
 738               with_pam=${withpam%/*}
 739 karl  1.3     if [ "$with_pam" = "" ]; then
 740 karl  1.1        with_pam=/
 741               fi
 742           else
 743               echo "pam: No"
 744           fi
 745           
 746           
 747           if [ ! -z "$with_pam" ]
 748           then
 749           
 750             if [ ! -f "/usr/include/security/pam_appl.h" -a \
 751                  ! -f "/usr/local/include/security/pam_appl.h" ]
 752             then
 753                 echo "$0: <security/pam_appl.h> is missing (required by --enable_pam)"
 754                 exit 1
 755             else
 756                 enable_pam=1
 757             fi
 758           
 759           fi
 760           fi
 761 karl  1.1 
 762           
 763           ##==============================================================================
 764           ##
 765           ## Create options.mak
 766           ##
 767           ##==============================================================================
 768           
 769           options=options.mak
 770           rm -f $options
 771           echo "# This file was generated by configure." >> $options
 772           echo "# ./configure $*" >> $options
 773 karl  1.5 echo " "  >> $options
 774           echo "## WARNING: The configure script is experimental and has known problems."   >> $options
 775           echo "##       Use it at your own risk and review the results carefully in this"   >> $options
 776           echo "##      options.mak file that it created."  >> $options
 777 karl  1.1 PEGASUS_HOME=$prefix
 778           PEGASUS_ROOT=$prefix
 779           PEGASUS_PLATFORM=$platform
 780           echo "export ROOT=$prefix" >> $options
 781           #echo "export PATH=$PATH:$cwd/$platform/bin" >> $options
 782           #echo "export LD_LIBRARY_PATH=$cwd/$platform/lib:$libdir" >> $options
 783           echo "export PEGASUS_PLATFORM=$platform" >> $options
 784           echo "export PEGASUS_ROOT=$prefix" >> $options
 785           echo "export PEGASUS_HOME=$prefix" >> $options
 786           
 787           if [ "$tiny" != "1" ]; 
 788           then
 789           enable_debug=1
 790           interop_name=root/PG_InterOp
 791           echo "export PEGASUS_ENABLE_AUDIT_LOGGER=true" >> $options
 792           echo "export PEGASUS_ENABLE_DMTF_INDICATION_PROFILE_SUPPORT=true" >> $options
 793           echo "export PEGASUS_ENABLE_EMAIL_HANDLER=true" >> $options
 794           echo "export PEGASUS_ENABLE_INDICATION_COUNT=true" >> $options
 795           echo "export PEGASUS_ENABLE_INTEROP_PROVIDER=true" >> $options
 796           if [ "$dis_wsman" != "1" ]; then
 797           echo "export PEGASUS_ENABLE_PROTOCOL_WSMAN=true" >> $options
 798 karl  1.1 fi
 799           echo "export PEGASUS_ENABLE_SYSTEM_LOG_HANDLER=true" >> $options
 800           echo "export PEGASUS_ENABLE_USERGROUP_AUTHORIZATION=true" >> $options
 801           #echo "export PEGASUS_ENABLE_PRIVILEGE_SEPARATION=true" >>$options
 802           fi
 803           
 804           
 805           if [ "$disable_oop" = "1" ]
 806           then
 807             echo "export PEGASUS_DEFAULT_ENABLE_OOP=false" >> $options
 808             echo "export PEGASUS_DISABLE_PROV_USERCTXT=1" >> $options
 809             echo "export PEGASUS_DISABLE_PRIVILEGED_TESTS=true" >> $options
 810           fi
 811           
 812             echo "export PEGASUS_ENABLE_CQL=true" >> $options
 813             echo "export PEGASUS_ENABLE_WQL=true" >> $options
 814           
 815           if [ "$disable_ipv6" = "1" ];
 816           then
 817             echo "export PEGASUS_ENABLE_IPV6=false" >> $options
 818           else
 819 karl  1.1   echo "export PEGASUS_ENABLE_IPV6=true" >> $options
 820           fi
 821           
 822           echo "export PEGASUS_INTEROP_NAMESPACE=$interop_name" >> $options
 823           if [ "$disable_trace" = "1" ];
 824           then
 825             echo "export PEGASUS_REMOVE_TRACE=1" >> $options
 826           fi
 827           
 828           if [ "$disable_tests" = "1" ];
 829           then
 830             echo "export PEGASUS_SKIP_MOST_TEST_DIRS=true" >> $options
 831           fi
 832           if [ "$enable_perinst" = "1" ];
 833           then 
 834             echo "export PEGASUS_DISABLE_PERFINST=true" >> $options
 835             echo "export PEGASUS_INDICATION_PERFINST=true" >> $options
 836           fi
 837           
 838           if [ "$enable_debug" = 1 ]
 839           then
 840 karl  1.1   echo "export PEGASUS_DEBUG=1" >> $options
 841           fi
 842           
 843           if [ "$enable_mrr_generation" = 1 ]
 844           then
 845             echo "export PEGASUS_ENABLE_MRR_GENERATION=1" >> $options
 846           fi
 847           
 848           if [ "$enable_mrr" = 1 ]
 849           then
 850             echo "export PEGASUS_ENABLE_MRR=1" >> $options
 851           fi
 852           if [ "$enable_pam" = "1" ]; then
 853             echo "export PEGASUS_PAM_AUTHENTICATION=true" >> $options
 854 karl  1.4   echo "export PEGASUS_USE_PAM_STANDALONE_PROC=false" >> $options
 855 karl  1.1    \cp -f $PEGASUS_ROOT/rpm/wbem /etc/pam.d
 856              chmod 0644 /etc/pam.d/wbem
 857           fi
 858           
 859           if [ "$enable_pam_standalone" = "1" ]; then
 860             echo "export PEGASUS_PAM_AUTHENTICATION=true" >> $options
 861             echo "export PEGASUS_USE_PAM_STANDALONE_PROC=true" >> $options
 862             \cp -f $PEGASUS_ROOT/rpm/wbem /etc/pam.d
 863             chmod 0644 /etc/pam.d/wbem
 864           fi
 865           
 866           if [ "$enable_binary_repository" = "1" ]; then
 867             echo "export PEGASUS_REPOSITORY_MODE=BIN" >> $options
 868           fi
 869           
 870           if [ "$enable_libz" = "1" ]; then
 871             echo "export PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1" >> $options
 872           fi
 873           
 874           if [ "$enable_ssl" = "1" ]; then
 875             echo "export PEGASUS_HAS_SSL=true" >> $options
 876 karl  1.1   echo "export PEGASUS_ENABLE_SSL_CRL_VERIFICATION=true" >> $options
 877           fi
 878           
 879           if [ ! -z "$with_ssl" ]; then
 880             echo "export OPENSSL_HOME=$with_ssl" >> $options
 881           fi
 882           
 883           if [ "$enable_slp" = "1" ]; then
 884               echo "export PEGASUS_ENABLE_SLP=true" >> $options
 885           fi
 886           
 887           if [ "$enable_sql" = "1" ]; then
 888               echo "export PEGASUS_USE_SQLITE_REPOSITORY=true" >> $options
 889               echo "export SQLITE_HOME=$with_sql">> $options
 890           fi
 891           if [ "$enable_snmp" = "1" ]; then
 892               echo "export PEGASUS_ENABLE_NET_SNMPV3=true" >> $options
 893               echo "export PEGASUS_USE_NET_SNMP=true" >> $options
 894           fi
 895           
 896           if [ "$enable_openslp" = "1" ]; then
 897 karl  1.1     echo "export PEGASUS_ENABLE_SLP=true" >> $options
 898               echo "export PEGASUS_USE_EXTERNAL_SLP=openslp" >> $options
 899           fi
 900           
 901           #if [ ! -z "$with_external_slp" ]; then
 902           #    echo "export PEGASUS_ENABLE_SLP=true" >> $options
 903           #    echo "export PEGASUS_USE_EXTERNAL_SLP=$with_external_slp" >> $options
 904           #fi
 905           
 906           if [ ! -z "$with_external_slp_dir" ]; then
 907             echo "export PEGASUS_EXTERNAL_SLP_HOME=$with_external_slp_dir" >> $options
 908           fi
 909           
 910           if [ ! -z "$with_openslp" ]; then
 911             echo "export PEGASUS_EXTERNAL_SLP_HOME=$with_openslp" >> $options
 912           fi
 913           
 914           if [ "$disable_cmpi" != "1" ]; then
 915             echo "export PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=true" >> $options
 916           fi
 917           
 918 karl  1.1 if [ ! -z "$flavor" ]; then
 919             echo "export PEGASUS_FLAVOR=tog">>$options
 920           fi
 921           
 922           if [ "$supporticu" = "1" ]; then
 923             echo "export PEGASUS_HAS_MESSAGES=true">>$options
 924             echo "export PEGASUS_HAS_ICU=true">>$options
 925             echo "export PEGASUS_USE_DEFAULT_MESSAGES=true">>$options
 926           # echo "export ICU_INSTALL=$with_icu">>$options
 927           fi
 928           
 929           if [ "$enable_32bit" = "1" ]; then
 930             #echo "export PEGASUS_INTERNAL_ENABLE_32BIT_PROVIDER_SUPPORT=true" >> $options
 931             echo "export PEGASUS_PLATFORM_FOR_32BIT_PROVIDER_SUPPORT=$platform" >> $options
 932           fi
 933           
 934           if [ "$test_option" = "1" ]; then
 935              echo "export PEGASUS_CCOVER=true" >> $options
 936              echo "export PEGASUS_DISABLE_PRIVILEGED_TESTS=false" >> $options
 937              echo "export PEGASUS_ENABLE_GCOV=true" >> $options
 938              echo "export PEGASUS_ENABLE_SORTED_DIFF=true" >> $options
 939 karl  1.1    echo "export PEGASUS_TEST_ENABLE_DEBUG_TRACE=true" >> $options
 940              echo "export PEGASUS_TEST_ISGROUP_GROUP=root" >> $options
 941              echo "export PEGASUS_TEST_ISGROUP_USER_FAILURE=test" >> $options
 942              echo "export PEGASUS_TEST_ISGROUP_USER_SUCCESS=root" >> $options
 943              echo "export PEGASUS_TEST_SDK=true" >> $options
 944              echo "export PEGASUS_TEST_USER_DEFINED=false" >> $options
 945              echo "#export PEGASUS_TEST_USER_ID=" >> $options
 946              echo "#export PEGASUS_TEST_USER_PASS=" >> $options
 947              echo "export PEGASUS_TEST_VALGRIND_LOG_DIR=." >> $options
 948              echo "export PEGASUS_OVERRIDE_SSL_CERT_VERIFICATION_RESULT=true" >> $options
 949              echo "export PEGASUS_TMP=." >> $options
 950              echo "export PLATFORM_CORE_PATTERN=true" >> $options
 951           fi 
 952              echo "export PATH=$bindir:$PATH" >> $options
 953              echo "export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH" >> $options
 954           
 955           IFS="@@@"
 956           export PATH=$bindir:$PATH 
 957           export LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH
 958           export PEGASUS_HOME PEGASUS_ROOT PEGASUS_PLATFORM
 959           
 960 karl  1.1 echo "created $options"
 961           
 962           ## if the output file exists, make a backup
 963           if [ -f $options ]; then
 964               echo backup $options to $options.bak
 965               cp -f $options $options.bak
 966           fi
 967           
 968 karl  1.2 . ./$options
 969 karl  1.1 ##==============================================================================
 970           ##
 971           ## Create GNUmakefile
 972           ##
 973           ##==============================================================================
 974           
 975           cat > GNUmakefile << END
 976           include options.mak
 977           
 978           export PATH := \$(PATH):\$(PEGASUS_HOME)/bin
 979           export LD_LIBRARY_PATH := \$(LD_LIBRARY_PATH):\$(PEGASUS_HOME)/bin
 980           
 981           include Makefile
 982           
 983           distclean:
 984           	rm -f GNUmakefile
 985           	rm -f options.mak
 986 karl  1.5 	rm -f options.mak.bak
 987 karl  1.1 END
 988           
 989           echo "created GNUmakefile"
 990           
 991           ##==============================================================================
 992           ##
 993           ## Print final message:
 994           ##
 995           ##==============================================================================
 996           
 997           echo "configured for $platform"
 998 karl  1.5 echo ===================
 999           echo WARNING: This script is experimental and has known problems. Please
1000           echo      use it at your own risk and review the results carefully in the \
1001           echo      options.mak file that it creates.  Until this script is completed
1002           echo      the traditional OpenPegasus build configuration through environment
1003           echo      variables will remain in place and is the prefered setup tool
1004           echo ===================
1005 karl  1.1 echo
1006           fi
1007           #set +x

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2